c.PredictiveModelList {lulcc} | R Documentation |
Merge PredictiveModelList objects
Description
Combine different PredictiveModelList objects into one
Usage
## S3 method for class 'PredictiveModelList'
c(..., recursive = FALSE)
Arguments
... |
two or more PredictiveModelList objects |
recursive |
for consistency with generic method (ignored) |
Value
a PredictiveModelList object
Examples
## Not run:
## Plum Island Ecosystems
## load data
data(pie)
## observed maps
obs <- ObsLulcRasterStack(x=pie,
pattern="lu",
categories=c(1,2,3),
labels=c("Forest","Built","Other"),
t=c(0,6,14))
## explanatory variables
ef <- ExpVarRasterList(x=pie, pattern="ef")
part <- partition(x=obs[[1]], size=0.1, spatial=TRUE)
train.data <- getPredictiveModelInputData(obs=obs, ef=ef, cells=part[["train"]], t=0)
forms <- list(Built ~ ef_001+ef_002+ef_003,
Forest ~ 1,
Other ~ ef_001+ef_002)
glm.models <- glmModels(formula=forms, family=binomial, data=train.data, obs=obs)
glm.models
## separate glm.models into two PredictiveModelList objects
mod1 <- glm.models[[1]]
mod2 <- glm.models[[2:3]]
## put them back together again
glm.models <- c(mod1, mod2)
glm.models
## End(Not run)
[Package lulcc version 1.0.4 Index]