Learn R Programming

swaRmverse (version 0.1.0)

par_nn_metrics: 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)

Value

The input dataframe with new columns for nnd (nearest neighbor distance),

nn_id (its id) and bangl (nearest neighbor bearing angle).

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.

Author

Marina Papadopoulou m.papadopoulou.rug@gmail.com