View source: R/events_N_duration.R
events_summary | R Documentation |
This function summarizes the number of events and their total duration in the dataset.
events_summary(data, step2time)
data |
A dataframe with a |
step2time |
The sampling frequency of the dataframe (how many seconds are between each row of the data). |
A dataframe with 3 columns: set
, ev_count
(number of
events), and dur
(duration of events in seconds).
Marina Papadopoulou m.papadopoulou.rug@gmail.com
events_dur
, events_n
data <- data.frame(
set = c(rep('1', 50), rep('2', 50)),
keep = c(rep(FALSE, 10), rep(TRUE, 70), rep(FALSE, 20))
)
time_per_row <- 1 # seconds
events_summary(data, time_per_row)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.