|Subsetting LEMs||R Documentation|
Methods to subset LinearEmbeddingMatrix objects.
## S4 method for signature 'LinearEmbeddingMatrix,ANY,ANY' x[i, j, ..., drop=TRUE] ## S4 replacement method for signature ## 'LinearEmbeddingMatrix,ANY,ANY,LinearEmbeddingMatrix' x[i, j] <- value
A LinearEmbeddingMatrix object.
A vector of logical or integer subscripts, indicating the rows and columns to be subsetted for
Extra arguments that are ignored.
A logical scalar indicating whether the result should be coerced to the lowest possible dimension.
A LinearEmbeddingMatrix object with number of rows equal to length of
Subsetting yields a LinearEmbeddingMatrix object containing the specified rows (samples) and columns (factors).
If column subsetting is performed, values of
factorData will be modified to retain only the selected factors.
drop=TRUE and the subsetting would produce dimensions of length 1, those dimensions are dropped and a vector is returned directly from
This mimics the expected behaviour from a matrix-like object.
Users should set
drop=FALSE to ensure that a LinearEmbeddingMatrix is returned.
For subset replacement, if neither
j are set,
x will be effectively replaced by
However, row and column names will not change, consistent with replacement in ordinary matrices.
[, a subsetted LinearEmbeddingMatrix object is returned.
[<-, a modified LinearEmbeddingMatrix object is returned.
example(LinearEmbeddingMatrix, echo=FALSE) # using the class example lem[1:10,] lem[,1:5] lem2 <- lem lem2[1:10,] <- lem[11:20,]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.