View source: R/events_metrics.R
event_metrics | R Documentation |
This function calculates metrics of collective motion across sets and events.
event_metrics(global_df, pairwise_df)
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: |
A dataframe with 10 metrics per event.
Marina Papadopoulou m.papadopoulou.rug@gmail.com
group_metrics
, nn_metrics
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.