Class representation for bio-logging sensor data.

Sensors(sensor_data, deployid_col, datetime_col, sensor_cols)

Arguments

sensor_data

[data.frame] A data frame containing one or more bio-logging sensor time series (e.g. pitch or overall dynamic body acceleration). Must have columns for deployment ID and datetime (POSIXct).

deployid_col

[character(1)] Name of the column in sensor_data with the bio-logger deployment IDs.

datetime_col

[character(1)] Name of the column in sensor_data with datetimes of records.

sensor_cols

[character] Names of the columns in sensor_data containing sensor data.

Details

Create a Sensors object with Sensors().

Slots

.data

A list of Pandas DataFrames.

Examples

# Pretend we have bio-logging sensor data for two dogs
dogs_df <- data.frame(
  dogs = rep(c("A", "B"), each = 100),
  dogtime = rep(as.POSIXct("2000-01-01 06:00") + 1:100, 2),
  pitch = rep(90 * sin(seq(0, 20 * pi, length.out = 100))),
  odba = rep(90 * sin(seq(0, 20 * pi, length.out = 100)))^2
)
head(dogs_df)
#>   dogs             dogtime     pitch       odba
#> 1    A 2000-01-01 06:00:01  0.000000    0.00000
#> 2    A 2000-01-01 06:00:02 53.361714 2847.47248
#> 3    A 2000-01-01 06:00:03 85.941202 7385.89015
#> 4    A 2000-01-01 06:00:04 85.050074 7233.51503
#> 5    A 2000-01-01 06:00:05 51.035388 2604.61080
#> 6    A 2000-01-01 06:00:06 -2.855514    8.15396
Sensors(dogs_df, "dogs", "dogtime", c("pitch", "odba"))
#> Sensors
#>   2 deployments.
#>   With column(s): pitch, odba