Coercing objects to trip class

as.trip(x, ...)

Arguments

x,

ltr ltraj object

...

Arguments passed to other methods. Ignored for ltraj method.

Methods

coerce

signature(from="ltraj", to="trip")

as.trip

signature(x="ltraj")

Examples

d <- data.frame(x=1:10, y=rnorm(10), tms=Sys.time() + 1:10, id=gl(2, 5)) sp::coordinates(d) <- ~x+y ## this avoids complaints later, but these are not real track data (!) sp::proj4string(d) <- sp::CRS("+proj=laea +ellps=sphere", doCheckCRSArgs = FALSE) tr <- trip(d, c("tms", "id")) if (require(adehabitatLT)) { ##l <- as.ltraj.trip(tr) ##ltraj2trip(l) ##as.trip(l) }
#> Loading required package: adehabitatLT
#> Loading required package: sp
#> Loading required package: ade4
#> Loading required package: adehabitatMA
#> Registered S3 methods overwritten by 'adehabitatMA': #> method from #> print.SpatialPixelsDataFrame sp #> print.SpatialPixels sp
#> Loading required package: CircStats
#> Loading required package: MASS
#> Loading required package: boot
#> NULL