diff --git a/DESCRIPTION b/DESCRIPTION index 19026e21..25c65930 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -25,7 +25,6 @@ Imports: sp, tibble, tidyr, - units, zip Suggests: gganimate, diff --git a/R/vis-make_transition3.r b/R/vis-make_transition3.r index 9de7f041..518012e2 100644 --- a/R/vis-make_transition3.r +++ b/R/vis-make_transition3.r @@ -193,7 +193,7 @@ make_transition3 <- function(poly, res = c(0.1, 0.1), receiver_points = NULL, ep recs_gl <- sf::st_transform(receiver_points, crs = epsg) # determine shortest distance from receiver to water polygon - dist_rec <- units::drop_units(sf::st_distance(recs_gl, poly_gl)) + dist_rec <- as.matrix(sf::st_distance(recs_gl, poly_gl)) recs_gl$rec_water_dist <- apply(dist_rec, 1, "min") # extract rec_water_dist > 0