Learn R Programming

trip (version 1.10.0)

as.trip: Coercion from other classes to trip objects

Description

Coercing objects to trip class

Usage

as.trip(x, ...)

Value

S4 trip object

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

Run this code
 d <- data.frame(x=1:10, y=rnorm(10), tms=Sys.time() + 1:10, id=gl(2, 5))
tr <- trip(d)
if (require(adehabitatLT)) {
    l <- as(tr, "ltraj")
    ltraj2trip(l)
    as.trip(l)
}

Run the code above in your browser using DataLab