Learn R Programming

sca (version 0.9-2)

simpvector: Simplify a (Principal Component) Vector to a Simple Component

Description

Simplifies the vector x to become a ``simple'' component vector (of the same size).

Usage

simpvector(x)

Value

a ``simplified'' version of x, i.e. an integer vector of the same length and each entry with the same signs.

Arguments

x

numeric vector of length n, say.

See Also

sca, also for references

Examples

Run this code
 x0 <- c(-2:3, 3:-1,0:3,1,1)
 cbind(x0, simpvector(x0)) # entries (-11, 0, 3)

Run the code above in your browser using DataLab