Description Usage Arguments Value Author(s) See Also Examples
View source: R/spatio-temporalPreparation.R
A function selecting the strongest correlated neighbours from a larger set of neighbours
1 2 | reduceNeighbours(stNeigh, stDepFun, n,
prediction=stNeigh@prediction, dropEmpty=!prediction)
|
stNeigh |
the proxy neighbourhood to be investigated |
stDepFun |
a spatio-temporal dependence function that return correlation estimates based on a spatial and temporal distance |
n |
the number of neighbours to be selected. |
prediction |
whether the neighbourhood is used for prediction (the data slot does not provide the central location's data) |
dropEmpty |
whether empty neighbourhoods (i.e. neighbourhoods with |
A spatio-temporal neighbourhood stNeighbourhood
with fewer neighbours.
Benedikt Graeler
1 2 3 4 5 6 7 8 9 10 11 12 | 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,3,4)
data <- data.frame(var1=runif(10))
stData <- STFDF(sp, time, data)
stNeigh <- getStNeighbours(stData, spSize=2, tlags=-(0:2))
reduceNeighbours(stNeigh, function(h,delta) return(1/h/delta), 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.