Closed WhitneyH1317 closed 2 years ago
Sorry for the long delay. This should all work since a few updates already.
library(amt)
mini_deer <- deer[1:100, ]
get_crs(mini_deer)
# Data without CRS
dat <- data.frame(x = mini_deer$x_, y = mini_deer$y_, t = mini_deer$t_)
dat <- make_track(dat, x, y, t)
get_crs(dat)
hr_akde(dat) # Error as expected
# Use deprecated proj4string
dat <- data.frame(x = mini_deer$x_, y = mini_deer$y_, t = mini_deer$t_)
dat <- make_track(dat, x, y, t, crs = CRS("+init=epsg:3035"))
get_crs(dat)
hr_akde(dat) # Works fine
# Using new WKT2
dat <- data.frame(x = mini_deer$x_, y = mini_deer$y_, t = mini_deer$t_)
dat <- make_track(dat, x, y, t, crs = 3035)
get_crs(dat)
hr_akde(dat) # Works fine
Currently the crs argument in the mk_track function only accepts proj4string characters, when R has now moved on to WKT2 strings. Attempting hr_akde from a track_xyt object with a deprecated CRS argument in a newly updated R environment no longer works.