powered by
These functions coerce an object to a 2-dimensional array in the shape of a row or column vector, i.e. an array with dimensions c(1,d) or c(d,1) respectively, where d=length(x).
array
c(1,d)
c(d,1)
d=length(x)
as.mRowVector(x, USE.NAMES = TRUE)as.mColVector(x, USE.NAMES = TRUE)
as.mColVector(x, USE.NAMES = TRUE)
A row or column vector with the data from x.
x
An object that can be passed to array().
array()
If TRUE and x has only one non-singular dimension, its names are preserved.
TRUE
x <- c(a=1, b=2, c=3) as.mColVector(x) y <- matrix(1:12, 3, 4) as.mRowVector(y)
Run the code above in your browser using DataLab