subset-methods: Subset

Description Usage Arguments Examples

Description

Extract a subset of objects from container classes such as ExpVarRasterList, PredictiveModelList, PredictionList and PerformanceList.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## S4 method for signature 'ExpVarRasterList'
subset(x, subset, ...)

## S4 method for signature 'PredictiveModelList'
subset(x, subset, ...)

## S4 method for signature 'PerformanceList'
subset(x, subset, ...)

## S4 method for signature 'PredictionList'
subset(x, subset, ...)

Arguments

x

an object of class ExpVarRasterList, PredictiveModelList, PredictionList or PerformanceList

subset

integer or character indicating the objects to be extracted

...

additional arguments (none)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Sibuyan Island

## load observed land use data
obs <- ObsLulcRasterStack(x=sibuyan$maps,
                    pattern="lu",
                    categories=c(1,2,3,4,5),
                    labels=c("Forest","Coconut","Grass","Rice","Other"),
                    t=c(0,14))

summary(obs)
obs <- subset(obs, subset=names(obs)[1])
summary(obs)

## load explanatory variables
ef <- ExpVarRasterList(x=sibuyan$maps, pattern="ef")

summary(ef)
ef <- subset(ef, subset=1:5)
summary(ef)

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