get_interactions {aniSNA} | R Documentation |
To obtain interactions from raw GPS observations
Description
To obtain interactions from raw GPS observations
Usage
get_interactions(species_raw, temporal_thresh = 7, spatial_thresh, n_cores = 1)
Arguments
species_raw |
A DataFrame consisting of GPS observations. It should have at least four columns namely "animal_id", "datetime", "latitude|_rad", and "longitude_rad". "latitude|_rad", and "longitude_rad" are latitude and longitude values in radians respectively. See function "get_coordinates_in_radian" to get these values. |
temporal_thresh |
Temporal threshold in minutes with default 7 minutes |
spatial_thresh |
The maximum distance in meters within which two animals are considered interacting |
n_cores |
Number of cores for parallel processing with default 1 |
Value
A dataframe consisting of five columns. The first two columns contain animal ids, third and fourth column contain timestamp of their observations and the final column contains the distance between the two individuals.
Examples
data(elk_data_2010)
get_interactions(elk_data_2010, temporal_thresh = 7, spatial_thresh = 15)