Extract by index {lulcc}R Documentation

Extract by index

Description

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

Usage

## 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


## 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]])


[Package lulcc version 1.0.4 Index]