| ltraj2spdf {adehabitatLT} | R Documentation |
Conversion of the class "ltraj" to the package "sp"
Description
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.
Usage
ltraj2spdf(ltr)
ltraj2sldf(ltr, byid = FALSE)
Arguments
ltr |
an object of class |
byid |
logical. If |
Author(s)
Clement Calenge clement.calenge@ofb.gouv.fr
See Also
ltraj for objects of class
ltraj.
Examples
## 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)
[Package adehabitatLT version 0.3.27 Index]