extractIndex: Extract by index

Description Usage Arguments Examples

Description

object[[i]] can be used to extract individual objects from container classes such as ExpVarRasterList, PredictiveModelList, PredictionList and PerformanceList.

Usage

1
2
3
4
5
## S4 method for signature 'ExpVarRasterList,ANY,ANY'
x[[i, j, ...]]

## S4 method for signature 'CategoryLabel,ANY,ANY'
x[[i, j, ...]]

Arguments

x

an object of class ExpVarRasterList or any object inheriting from the virtual class CategoryLabel

i

layer number (if 'x' inherits from a RasterStack) or list index (if 'x' stores data as a list)

j

numeric (not used)

...

additional arguments (none)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Plum Island Ecosystems

## Load observed land use maps
obs <- ObsLulcRasterStack(x=pie,
                   pattern="lu",
                   categories=c(1,2,3),
                   labels=c("forest","built","other"),
                   t=c(0,6,14))

summary(obs[[1]])
summary(obs[[1:2]])

lulcc documentation built on May 29, 2017, 12:59 p.m.