Description Usage Arguments Value Author(s) See Also Examples
View source: R/spatio-temporalPreparation.R
An object that stores the nearest k spatio-temporal neighbours for a set of locations.
1 | stNeighbourhood(data, distances, index, var, coVar, prediction)
|
data |
A data.frame that contains the variables of interest for each local spatio-temporal neighbourhood. |
distances |
A matrix with all the separating distances per local spatio-temporal neighbourhood. |
index |
An index pointing from each neighbourhood to the corresponding spatial IDs. |
var |
the variable's name |
coVar |
the covariate's name |
prediction |
whether this neighbourhood is intended to be used for prediction or fitting purpose. |
A stNeighbourhood
object.
Benedikt Graeler
stNeighbourhood
, getStNeighbours
1 2 3 4 5 6 7 8 9 10 11 12 13 | library("sp")
library("spacetime")
sp <- SpatialPoints(matrix(c(181000,181100,333500,333600),2))
time <- as.POSIXct("2014-03-18")+60*60*24*c(0,1,2)
data <- data.frame(var1=runif(6))
stData <- STFDF(sp, time, data)
stQuerry <- STF(SpatialPoints(matrix(c(181000,181200,333600,333600),2)),
time[2:3])
getStNeighbours(stData=stData, ST=stQuerry, prediction=TRUE, spSize=3,
tlags=-(0:1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.