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"))
as.trip.SpatialLinesDataFrame(tr)
as(tr, "SpatialLinesDataFrame")
Run the code above in your browser using DataLab