Conversion of the class "ltraj" to the package "sp"
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)
ltr |
an object of class |
byid |
logical. If |
Clement Calenge clement.calenge@ofb.gouv.fr
ltraj for objects of class
ltraj.
## Not run:
if (require(sp)) {
#########################################
##
## Conversion ltraj -> SpatialPointsDataFrame
##
data(puechcirc)
plot(puechcirc)
toto <- ltraj2spdf(puechcirc)
plot(toto)
#########################################
##
## Conversion ltraj -> SpatialLinesDataFrame
##
toto <- ltraj2sldf(puechcirc)
plot(toto)
}
## End(Not run)Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.