Events.Rd
Class representation for labeled behavioral events in bio-logging data.
Events(event_data, deployid_col, datetime_col)
[data.frame]
. A two-column data frame with bio-logger
deployment IDs in one column and event datetimes in the other. The event
datetimes must be POSIXct
.
[character(1)]
. The name of the column in event_data
containing deployment IDs.
[character(1)]
. The name of the column in event_data
with event datetimes.
Create an Events object with Events
().
.data
A list of Pandas DatetimeIndexes.
# Pretend we have behavioral event data for two dogs that like to bark at a
# clock tower
barking_df <- data.frame(
dogs = rep(c("A", "B"), each = 4),
barktime = as.POSIXct("2000-01-01 06:00") + lubridate::hours(0:7)
)
barking_df
#> dogs barktime
#> 1 A 2000-01-01 06:00:00
#> 2 A 2000-01-01 07:00:00
#> 3 A 2000-01-01 08:00:00
#> 4 A 2000-01-01 09:00:00
#> 5 B 2000-01-01 10:00:00
#> 6 B 2000-01-01 11:00:00
#> 7 B 2000-01-01 12:00:00
#> 8 B 2000-01-01 13:00:00
Events(barking_df, "dogs", "barktime")
#> Events
#> 2 deployments.
#> With 8 events.