| geostatData | R Documentation |
Extracts covariates at observation locations, aligns covariate rasters to a
prediction grid, and returns the data structures used by glgm
and lgm.
geostatData(formula, data, grid, covariates, buffer = 0)
## S3 method for class 'SpatVector'
geostatData(formula, data, grid, covariates, buffer = 0)
## S3 method for class 'SpatRaster'
geostatData(formula, data, grid = data, covariates = NULL, buffer = 0)
## Default S3 method:
geostatData(formula, data, ...)
formula |
Model formula. Names on the right-hand side are taken from
|
data |
A |
grid |
A |
covariates |
A |
buffer |
Extra space padded around |
... |
Ignored. The default method reports an error if |
A list with
data |
For |
grid |
The (possibly buffered) square |
covariates |
A |
formula |
Returned only by the |
glgm, lgm, squareRaster
data("loaloa")
loaloa = unwrap(loaloa)
elevationLoa = unwrap(elevationLoa)
eviLoa = unwrap(eviLoa)
res = geostatData(
y ~ elev + evi,
data = loaloa,
covariates = list(elev = elevationLoa, evi = eviLoa),
grid = squareRaster(loaloa, cells = 20, buffer = 1e4)
)
names(res)
names(res$data)
res$grid
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.