ld {adehabitatLT}R Documentation

Quick Conversion of Objects of Class ltraj from and to Dataframes

Description

The two functions ld and dl are useful to quickly convert objects of class ltraj from and to dataframes.

Usage

ld(ltraj)
dl(x, proj4string=CRS())

Arguments

ltraj

an object of class ltraj

x

an object of class data.frame, containing at least columns named x,y,date.

proj4string

a valid CRS object containing the projection information.

Details

The function ld concatenates all bursts in an object of class ltraj, adds two columns named id and burst, and, when it is present, also adds the variables in the infolocs component.

The function dl creates an object of class ltraj from a data.frame. If no column named id exists, a random ID is generated. If no column named burst exists, the ID is used as burst. The columns named "dx", "dy", "dist", "dt", "R2n", "abs.angle" and "rel.angle" are recomputed by the function (see ?as.ltraj). Additional columns are used as the infolocs component.

Value

ld returns an object of class data.frame.
dl returns an object of class ltraj.

Author(s)

Clement Calenge clement.calenge@ofb.gouv.fr

See Also

as.ltraj for additional information about objects of class ltraj

Examples

 data(puechcirc)
 puechcirc ## class ltraj
 uu <- ld(puechcirc)
 head(uu)
 dl(uu)

[Package adehabitatLT version 0.3.25 Index]