as.stlpp {stlnpp} | R Documentation |
Convert data to a spatio-temporal point pattern on a linear network
Description
This function converts data to a spatio-temporal point pattern on a linear network.
Usage
as.stlpp(x,y,t,L)
Arguments
x , y , t |
vectors of Cartesian coordinates and time occurrence. Alternatively, x can be of classes |
L |
linear network (object of class |
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
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)