Group Metrics of Collective Motion in a Dataset
Source:R/metrics_calc_group.R
group_metrics_per_set.Rd
This function calculates the timeseries of average speed, polarization and shape of all set in a dataset
Arguments
- data_list
A list of dataframes with groups timeseries per set. Columns must include:
id
,t
,set
,head
,x
,y
,speed
.- mov_av_time_window
Integer, timesteps to use as a sliding window for average speed and polarization.
- geo
Logical, whether positions are geographic coordinates, default = FALSE.
- step2time
Double, the sampling frequency of the data (the relation between a time step and real time in seconds).
- parallelize
Logical, whether or not to parallelize over the timesteps of each set.
Value
A dataframe with the group average timeseries for each set, with columns:
set
, t
, pol
, speed
, shape
, N
(number of individuals),
missing_ind
(whether some individuals are missing), pol_av
(moving average
of polarization based on input time window) and speed_av
(moving average of
speed based on input time window).
Author
Marina Papadopoulou m.papadopoulou.rug@gmail.com