stNeighbourhood: Constructor of the 'stNeighbourhood' class.

Description Usage Arguments Value Author(s) See Also Examples

Description

An object that stores the nearest k spatio-temporal neighbours for a set of locations.

Usage

1
stNeighbourhood(data, distances, index, var, coVar, prediction)

Arguments

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.

Value

A stNeighbourhood object.

Author(s)

Benedikt Graeler

See Also

stNeighbourhood, getStNeighbours

Examples

 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))

spcopula documentation built on May 2, 2019, 4:49 p.m.