montoye_features: Calculate features for Montoye's neural networks

View source: R/Montoye.R

montoye_featuresR Documentation

Calculate features for Montoye's neural networks

Description

Calculate features for Montoye's neural networks

Usage

montoye_features(
  d,
  time_var = "Timestamp",
  x_var = "Accelerometer_X",
  y_var = "Accelerometer_Y",
  z_var = "Accelerometer_Z",
  side = c("left", "right"),
  win_width_sec = 30,
  verbose = FALSE,
  ...
)

Arguments

d

data frame of data to use for generating predictions

time_var

character. Name of the column containing POSIX-formatted timestamps

x_var

character. Name of the X-axis variable

y_var

character. Name of the Y-axis variable

z_var

character. Name of the Z-axis variable

side

character vector or scalar indicating which side-specific wrist model(s) to implement for "Montoye 2017". Can be "left", "right", or c("left", "right")

win_width_sec

desired window width for features

verbose

logical. Print updates to console?

...

currently unused

Value

A dataframe of features for entry into the neural networks

References

Montoye et al. (2017) \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/1091367X.2017.1337638")}

Examples

if (isTRUE(requireNamespace("read.gt3x"))) {

  f <- system.file("extdata/TAS1H30182785_2019-09-17.gt3x", package = "read.gt3x")
  d <- read.gt3x::read.gt3x(f, asDataFrame = TRUE, imputeZeroes = TRUE)

  montoye_features(d[1:12000, ], "time", "X", "Y","Z", "right")

}

accelEE documentation built on Aug. 29, 2026, 1:07 a.m.