par_nn_metrics: Adding Motion Properties in Parallel - Verbose

View source: R/metrics_calc_pairwise.R

par_nn_metricsR Documentation

Adding Motion Properties in Parallel - Verbose

Description

This function calculates the bearing angle and distance from a focal individual to its nearest neighbor at the given timestep.

Usage

par_nn_metrics(per_time, geo = FALSE)

Arguments

per_time

A groups positional data at a single timestep. Columns must include: id, t, head, x, y.

geo

Logical, whether positions are geographic coordinates, default = FALSE.

Value

The input dataframe with new columns for nnd (nearest neighbor distance), nn_id (its id) and bangl (nearest neighbor bearing angle).

Author(s)

Marina Papadopoulou m.papadopoulou.rug@gmail.com


swaRmverse documentation built on Oct. 10, 2024, 5:08 p.m.