This function calculates the bearing angle and distance from a focal individual to its nearest neighbor at the given timestep.
par_nn_metrics(per_time, geo = FALSE)
The input dataframe with new columns for nnd
(nearest neighbor distance),
nn_id
(its id) and bangl
(nearest neighbor bearing angle).
A groups positional data at a single timestep.
Columns must include: id
, t
, head
, x
, y
.
Logical, whether positions are geographic coordinates, default = FALSE.
Marina Papadopoulou m.papadopoulou.rug@gmail.com