Sensors: Sensors class

View source: R/Sensors.R

Sensors-classR Documentation

Sensors class

Description

Class representation for bio-logging sensor data.

Usage

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)
Sensors(dogs_df, "dogs", "dogtime", c("pitch", "odba"))


FlukeAndFeather/rstickleback documentation built on June 23, 2022, 1:17 p.m.