SpatialFeatureExperiment-subset | R Documentation |
The method for SFE reconstructs the spatial graphs when the SFE object is
subsetted as the listw
objects encodes the nodes with indices which
are no longer valid after subsetting as some nodes are no longer present.
## 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 |
Logical. If |
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.