events_dur {swaRmverse}R Documentation

Total Duration of All Events

Description

This function calculates the total duration (in seconds) of events of collective motion in a dataset.

Usage

events_dur(data, step2time)

Arguments

data

A dataframe with a keep column, representing which rows are defined as events of collective motion (added by the define_events function).

step2time

The sampling frequency of the dataframe (how many seconds are between each row of the data).

Value

A numeric corresponding to the total duration of events in the dataset in seconds.

Author(s)

Marina Papadopoulou m.papadopoulou.rug@gmail.com

See Also

define_events, events_n


[Package swaRmverse version 0.1.0 Index]