events_summary {swaRmverse} | R Documentation |
Events Summary
Description
This function summarizes the number of events and their total duration in the dataset.
Usage
events_summary(data, step2time)
Arguments
data |
A dataframe with a |
step2time |
The sampling frequency of the dataframe (how many seconds are between each row of the data). |
Value
A dataframe with 3 columns: set
, ev_count
(number of
events), and dur
(duration of events in seconds).
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))
)
time_per_row <- 1 # seconds
events_summary(data, time_per_row)
[Package swaRmverse version 0.1.0 Index]