validate_accelerometry_data {walkboutr}R Documentation

Validate accelerometry input data

Description

The input schema for the accelerometry data is time and activity_counts.

Usage

validate_accelerometry_data(accelerometry_counts)

Arguments

accelerometry_counts

Raw accelerometry data with the expected schema.

Details

This function checks the schema of the accelerometry input data and raises an error if any schema constraints are violated.

The following schema validations are performed on the input data:

Value

This function does not return anything. It throws an error if the accelerometry data fails any of the validation checks.

Examples

# Example usage:
data <- data.frame(
  time = seq(
    as.POSIXct("2021-01-01 00:00:00", tz = "UTC"),
    as.POSIXct("2021-01-01 23:59:59", tz = "UTC"),
    by = "5 mins"
  )) %>%
  dplyr::mutate(activity_counts = sample(0:100, length(time), replace = TRUE))
validate_accelerometry_data(data)


[Package walkboutr version 0.6.0 Index]