ltraj2spdf | R Documentation |
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.