SpatialFeatureExperiment-subset | R Documentation |
Note that spatial neighborhood graphs may change meaning after subsetting. For example, for a k nearest neighbor graph, after subsetting, some cells might no longer have all k nearest neighbors from the original
## S4 method for signature 'SpatialFeatureExperiment,ANY,ANY,ANY'
x[i, j, ..., drop = FALSE]
x |
A |
i |
Row indices for subsetting. |
j |
column indices for subsetting. |
... |
Passed to the |
drop |
Ignored as of version 1.9.2. |
A subsetted SpatialFeatureExperiment
object.
# Just like subsetting matrices and SingleCellExperiment
library(SFEData)
sfe <- McKellarMuscleData(dataset = "small")
sfe_subset <- sfe[seq_len(10), seq_len(10), drop = TRUE]
# Gives warning as graph reconstruction fails
sfe_subset <- sfe[seq_len(10), seq_len(10)]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.