matrix | R Documentation |
fm.matrix
creates a matrix from the given set of values.
as.matrix
attempts to turn a FlashR matrix to an R matrix.
fm.as.matrix
attempts to turn its argument into a FlashR matrix.
fm.is.matrix
indicates whether a FlashR object is a matrix.
## S4 method for signature 'fm' as.matrix(x) ## S4 method for signature 'fmV' as.matrix(x) fm.is.matrix(fm) fm.as.matrix(x) fm.matrix(vec, nrow, ncol, byrow = FALSE)
x |
an R object |
vec |
an R data vector. |
nrow |
the desired number of rows. |
ncol |
the desired number of columns. |
byrow |
logical. If |
Currently, fm.matrix
takes an R vector or a FlashR vector as input
and the length of the vector must be the same as the number of rows if
byrow
is FALSE
or the same as the number of columns if
byrow
is TRUE
.
mat <- fm.matrix(runif(100), 100, 2) mat <- as.matrix(fm.runif.matrix(100, 2)) mat <- fm.as.matrix(matrix(runif(200), 100, 2)) res <- fm.is.matrix(mat)