embedded | R Documentation |
embedding spatial cross sectional data
## S4 method for signature 'sf'
embedded(data, target, E = 3, tau = 1, nb = NULL, detrend = FALSE)
## S4 method for signature 'SpatRaster'
embedded(data, target, E = 3, tau = 1, detrend = FALSE)
data |
observation data. |
target |
name of target variable. |
E |
(optional) embedding dimensions. |
tau |
(optional) step of spatial lags. |
nb |
(optional) neighbours list. |
detrend |
(optional) whether to remove the linear trend. |
A matrix
columbus = sf::read_sf(system.file("case/columbus.gpkg", package="spEDM"))
v = embedded(columbus,"crime")
v[1:5,]
cu = terra::rast(system.file("case/cu.tif", package="spEDM"))
r = embedded(cu,"cu")
r[1:5,]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.