regularize activity regularizes the timestamps in column 'ts' to
regular intervals for each animal_tag. The interval is defined by the
minutes. The following steps are performd:
Round each timestamp to the nearsed regular timestamp.
When several data points occur with the same regularized timestamp, aggregate these by calculation the mean of the activity values.
Insert data points for missing regularized timestamps with NA-activity values .
A data.table with the activity data. The following columns should be present: 'animal_tag', 'ts', 'act_x' and 'act_y'.
The regular interval in minutes.
The original data.table with regularized timestamps in column 'ts'.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.