These functions convert the class "ltraj" available in adehabitatLT toward
classes available in the package sp
.
ltraj2spdf
converts an object of class ltraj
into an
object of class SpatialPointsDataFrame
.
ltraj2sldf
converts an object of class ltraj
into an
object of class SpatialLinesDataFrame
.
ltraj2spdf(ltr)
ltraj2sldf(ltr, byid = FALSE)
an object of class ltraj
.
logical. If TRUE
, one objects of class
Lines
correspond to one animal. if FALSE
,
one object of class Lines
correspond to one burst.
Clement Calenge clement.calenge@ofb.gouv.fr
ltraj
for objects of class
ltraj
.
if (FALSE) {
if (require(sp)) {
#########################################
##
## Conversion ltraj -> SpatialPointsDataFrame
##
data(puechcirc)
plot(puechcirc)
toto <- ltraj2spdf(puechcirc)
plot(toto)
#########################################
##
## Conversion ltraj -> SpatialLinesDataFrame
##
toto <- ltraj2sldf(puechcirc)
plot(toto)
}
}
Run the code above in your browser using DataLab