Extract | R Documentation |
Operators acting on FlashR vectors and matrices to extract parts of the objects.
## S4 method for signature 'fm,ANY,missing,ANY' x[i, j, drop = TRUE] ## S4 method for signature 'fm,missing,ANY,ANY' x[i, j, drop = TRUE] ## S4 method for signature 'fm,ANY,ANY,ANY' x[i, j, drop = TRUE] ## S4 method for signature 'fmV,ANY,ANY,ANY' x[i] ## S4 replacement method for signature 'fm,ANY,missing,ANY' x[i, j] <- value ## S4 replacement method for signature 'fm,missing,ANY,ANY' x[i, j] <- value
x |
object from which to extract elements. |
i, j |
indices specifying elements to extract. Indices are integer or numeric vectors. |
drop |
for matrices. If |
value |
a FlashR vector or matrix that contains new data for the rows |
FlashR supports extracting data from an object as well as replacing data of a matrix. To assign data in a matrix, it only supports setting the entire rows or columns.
mat <- fm.runif.matrix(100, 10) mat[1:5,] mat[,1:5] mat[1:5,1:5] mat[,1] <- fm.runif(nrow(mat))