Closed JoshOBrien closed 2 years ago
Currently, amt::as_ltraj() produces an "ltraj" object whose coordinate columns have names "x_" and "y_". adehabitatLT::plot.ltraj(), though, expects an "ltraj" object in which the coordinate columns have names "x" and "y" (see code here).
amt::as_ltraj()
"ltraj"
"x_"
"y_"
adehabitatLT::plot.ltraj()
"x"
"y"
As a result, doing the following fails like so:
library(amt) library(adehabitatLT) plot(as_ltraj(deer)) ## Error in `[.data.frame`(i, , c("x", "y")) : undefined columns selected
This PR makes the call to plot.ltraj() shown above work, by renaming coordinate columns to "x" and "y" in the methods called by amt::as_ltraj().
plot.ltraj()
Thanks for fixing this, much appreciated.
@jmsigner You bet. Thanks again for making this package available to us all.
Currently,
amt::as_ltraj()
produces an"ltraj"
object whose coordinate columns have names"x_"
and"y_"
.adehabitatLT::plot.ltraj()
, though, expects an"ltraj"
object in which the coordinate columns have names"x"
and"y"
(see code here).As a result, doing the following fails like so:
This PR makes the call to
plot.ltraj()
shown above work, by renaming coordinate columns to"x"
and"y"
in the methods called byamt::as_ltraj()
.