| staudenmayer_features | R Documentation |
Calculate features for Staudenmayer models
staudenmayer_features(
d,
time_var = "Timestamp",
x_var = "Accelerometer_X",
y_var = "Accelerometer_Y",
z_var = "Accelerometer_Z",
win_width_sec = 15,
verbose = FALSE,
...
)
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 |
win_width_sec |
desired window width for features |
verbose |
logical. Print updates to console? |
... |
currently unused |
Data frame containing features in the specified format
Staudenmayer et al. (2015), \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1152/japplphysiol.00026.2015")}
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)
staudenmayer_features(d[1:12000, ], "time", "X", "Y", "Z")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.