to.matrix | R Documentation |
to.matrix
attempts to convert any data to a row matrix. In
particular, data frames are converted by as.matrix
, (numeric)
vectors are converted to a single row/column matrix, according to
the rowMatrix
argument.
to.matrix(x, rowMatrix = TRUE)
x |
data to convert to a matrix |
rowMatrix |
if |
matrix
Tomas Sieger
to.matrix(1:3)
to.matrix(1:3,rowMatrix=FALSE)
to.matrix(iris[1:3,1:4])
to.matrix(matrix(1:4,2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.