File: SpatialExperiment-subset.Rd

package info (click to toggle)
r-bioc-spatialexperiment 1.16.0%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,648 kB
  • sloc: makefile: 2
file content (41 lines) | stat: -rw-r--r-- 919 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/subset.R
\name{SpatialExperiment-subset}
\alias{SpatialExperiment-subset}
\alias{[,SpatialExperiment,ANY,ANY,ANY-method}
\title{Subsetting SpatialExperiment objects}
\arguments{
\item{x}{a \code{\link{SpatialExperiment}} object}

\item{i}{row indices for subsetting}

\item{j}{column indices for subsetting}
}
\value{
a \code{\link{SpatialExperiment}} object
}
\description{
The subsetting method for \code{\link{SpatialExperiment}} objects ensures
that spatial data attributes (\code{\link{spatialCoords}} and
\code{\link{imgData}}) are subsetted correctly to match rows and columns with
the remainder of the object.
}
\section{subset}{

\describe{
\item{\code{[}:}{ subsetting method}
}
}

\examples{
example(read10xVisium)

dim(spe)

set.seed(123)
idx <- sample(ncol(spe), 10)
sub <- spe[, idx]
dim(sub)
colData(sub)
spatialCoords(sub)
}