View source: R/events_N_duration.R
events_n | R Documentation |
This function calculates the number of events of collective motion in a dataset.
events_n(data)
data |
A dataframe with a |
an integer with the number of events of collective motion (sequences
of keep == TRUE
).
Marina Papadopoulou m.papadopoulou.rug@gmail.com
define_events
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.