simpvector {sca} | R Documentation |
Simplifies the vector x
to become a ``simple'' component vector
(of the same size).
simpvector(x)
x |
numeric vector of length n , say. |
a ``simplified'' version of x
, i.e. an integer vector of the
same length and each entry with the same signs.
sca
, also for references
x0 <- c(-2:3, 3:-1,0:3,1,1) cbind(x0, simpvector(x0)) # entries (-11, 0, 3)