collapse_gt3x: Collapse data that were read using 'read_gt3x'

View source: R/collapse_gt3x.R

collapse_gt3xR Documentation

Collapse data that were read using read_gt3x

Description

Collapse data that were read using read_gt3x

Usage

collapse_gt3x(
  AG,
  filename = "gt3x file",
  output_window_secs = 1,
  filter = TRUE,
  filter_hz = 35,
  verbose = FALSE,
  ...
)

## S3 method for class 'RAW'
collapse_gt3x(
  AG,
  filename = "gt3x file",
  output_window_secs = 1,
  filter = TRUE,
  filter_hz = 35,
  verbose = FALSE,
  method = c("legacy", "expanded"),
  ...
)

## S3 method for class 'IMU'
collapse_gt3x(
  AG,
  filename = "gt3x file",
  output_window_secs = 1,
  filter = TRUE,
  filter_hz = 35,
  verbose = FALSE,
  method = c("legacy", "expanded"),
  ...
)

Arguments

AG

The object to collapse, inheriting from class "RAW" or "IMU"

filename

character. Filename to associate with the data.

output_window_secs

the desired epoch length; defaults to one second

filter

a logical scalar: Apply a low-pass filter to gyroscope data?

filter_hz

The cutoff for the low-pass filter

verbose

A logical scalar: Print processing updates?

...

Additional arguments. Currently unused.

method

the collapsing method to use

Value

A data frame of collapsed data

Examples


file <- system.file(
  "extdata",
  "example.gt3x",
  package = "AGread"
)
data <- read_gt3x(file)
head(collapse_gt3x(data$RAW))
head(collapse_gt3x(data$IMU))


AGread documentation built on Sept. 13, 2022, 5:06 p.m.