as.stlpp: Convert data to a space-time point pattern on a linear...

View source: R/as.stlpp.R

as.stlppR Documentation

Convert data to a space-time point pattern on a linear network

Description

Convert data to a space-time point pattern on a linear network

Usage

as.stlpp(x,y,t,L)

Arguments

x,y,t

vectors of cartesian coordinates and time occurance. Alternatively, x can be of classes data.frame, ppp and lpp.

L

linear network (object of class linnet) on which the points lie.

Details

This function converts data to an object of class stlpp.

Data can be of formats:

  • x is of class class data.frame with three columns. Then columns are considered as cartesian coordinates (i.e. x,y,t) and they will be converted to a spatio-temporal point pattern on the linear network L.

  • x is a planar point pattern (class ppp). Then x will be converted to a spatio-temporal point pattern on the linear network L and with coresponding time vector t.

  • x is a linear point pattern (class lpp). Then x will be converted to a spatio-temporal point pattern on the linear network L and with coresponding time vector t.

  • x,y,t are vectors of same length where x,y are living on the corresponding network L.

Value

A spatio-temporal point pattern on a linear network. An object of class stlpp.

Author(s)

Mehdi Moradi <m2.moradi@yahoo.com>

See Also

as.lpp.stlpp, runifpointOnLines, as.lpp

Examples

data(easynet)
x <- runifpointOnLines(40, easynet)
t1 <- sample(1:10,40,replace=TRUE)
Y <- as.stlpp(x,t=t1,L=easynet)

Z <- as.lpp.stlpp(Y)
t2 <- sample(1:10,40,replace=TRUE)
W <- as.stlpp(Z,t=t2)

stlnpp documentation built on Nov. 11, 2022, 9:11 a.m.