extract-methods: Subset an SPData set

Description Usage Arguments Value Examples

Description

Select SPData[i,j] for cells i and channels j. Note that this does not subset out nearest neighbours also.

Usage

1
2
## S4 method for signature 'SPData,ANY,ANY,ANY'
x[i, j]

Arguments

i

Cells to subset

j

Channels to subset

x

object from which to extract element(s) or in which to replace element(s).

Value

An SPData object reduced to cells i and channels j

Examples

1
2
3
4
5
6
7
## Not run: 
## subset to cells 1,3,5 and channels 8 to 10:
i <- c(1,3,5)
j <- 8:10
sp.reduced <- sp[i,j]

## End(Not run)

kieranrcampbell/SpatialPRo documentation built on May 20, 2019, 9:24 a.m.