Skip to contents

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

Marina Papadopoulou m.papadopoulou.rug@gmail.com