Description Usage Arguments Value See Also Examples
View source: R/getPredictiveModelInputData.R
Extract a data.frame containing variables required for fitting predictive models. Column names correspond to the names of lu and ef.
1 | getPredictiveModelInputData(lu, ef, cells, ...)
|
lu |
an LulcRasterStack object |
ef |
an ExpVarRasterStack object |
cells |
index of cells to be extracted, which may be a
|
... |
additional arguments to as.data.frame |
A data.frame.
as.data.frame
, LulcRasterStack
,
ExpVarRasterStack
, partition
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ## Not run:
## Plum Island Ecosystems
lu <- DiscreteLulcRasterStack(x=stack(pie[1:3]),
categories=c(1,2,3),
labels=c("Forest","Built","Other"),
t=c(0,6,14))
idx <- data.frame(var=paste("ef_", formatC(1:3, width=3, flag=0)),
yr=rep(0,3),
dynamic=rep(FALSE,3))
ef <- ExpVarRasterStack(x=stack(pie[4:6]), index=idx)
part <- partition(x=lu, size=0.1, spatial=TRUE, t=0)
train.data <- getPredictiveModelInputData(lu=lu,
ef=ef,
cells=part[["train"]],
t=0)
dim(train.data)
names(train.data)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.