event_metrics {swaRmverse} | R Documentation |
Metrics of Collective Motion
Description
This function calculates metrics of collective motion across sets and events.
Usage
event_metrics(global_df, pairwise_df)
Arguments
global_df |
A data frame with time series of global group measurements.
Columns must include: |
pairwise_df |
A data frame with time series of pairwise measurements.
Columns must include: |
Value
A dataframe with 10 metrics per event.
Author(s)
Marina Papadopoulou m.papadopoulou.rug@gmail.com
See Also
Examples
## A dataframe with group timeseries
g_df <- data.frame(
t = 1:25,
set = rep(1, 25),
pol = c(rnorm(25)),
speed = c(rnorm(25)),
shape = c(rnorm(25)),
event = rep(1, 25),
N = rep(2, 25)
)
## A dataframe with individual timeseries
p_df <- data.frame(
t = rep(1:25, 2),
set = rep(1, 50),
nnd = c(rnorm(50)),
bangl = runif(25, 0, pi),
id = c(rep(1, 25), rep(2, 25)),
event = rep(1, 50)
)
events_dataframe <- event_metrics(g_df, p_df)
[Package swaRmverse version 0.1.0 Index]