
Last chance! 50% off unlimited learning
Sale ends in
Distances to frequently used areas. distance_to_center
calculates the
distance to the home-range center (i.e., the centroid of the x
and y
coordinates). distance_to_centers
calculates the distance to top_n
most
frequently used cells. Note, that the results of distance_to_center
is
different to distance_to_centers
with top_n = 1
, since in the first case
the distance to the centroid is calculated and in the second case the
distance to the raster cell with the most relocations.
distance_to_center(x, ...)# S3 method for track_xy
distance_to_center(x, trast, square = TRUE, ...)
# S3 method for numeric
distance_to_center(x, trast, square = TRUE, ...)
distance_to_centers(x, ...)
# S3 method for track_xy
distance_to_centers(x, trast, top_n = 10, square = TRUE, ...)
[track_xy, track_xyt]
A track created with make_track
.
Further arguments, none implemented.
[RasterLayer]
A template.
[logical(1)]
Should the distance be squared?
[integer(1)]
To how many centers should the distance be
calculated?
RasterLayer
# NOT RUN {
data(deer)
r <- raster::raster(bbox(deer, buffer = 100), res = 40)
d1 <- distance_to_center(deer, r)
d2 <- distance_to_centers(deer, r, top_n = 1)
d3 <- distance_to_centers(deer, r, top_n = 10)
# }
Run the code above in your browser using DataLab