events_n {swaRmverse} | R Documentation |
Number of Events
Description
This function calculates the number of events of collective motion in a dataset.
Usage
events_n(data)
Arguments
data |
A dataframe with a |
Value
an integer with the number of events of collective motion (sequences
of keep == TRUE
).
Author(s)
Marina Papadopoulou m.papadopoulou.rug@gmail.com
See Also
Examples
data <- data.frame(
set = c(rep('1', 50), rep('2', 50)),
keep = c(rep(FALSE, 10), rep(TRUE, 70), rep(FALSE, 20))
)
events_n(data) ## 2 events
[Package swaRmverse version 0.1.0 Index]