powered by
## S3 method for class 'trip': as.ppp(X, ..., fatal) ## S3 method for class 'trip': as.psp(x, ..., from, to)
d <- data.frame(x = 1:10, y = rnorm(10), tms = Sys.time() + 1:10, id = gl(2, 5)) coordinates(d) <- ~x+y tr <- trip(d, c("tms", "id")) require(spatstat) as.ppp(tr) as.psp(tr)
Run the code above in your browser using DataLab