View source: R/generic_features.R
| generic_features | R Documentation |
Calculate generic features for model application
generic_features(
d,
time_var = "Timestamp",
x_var = "Accelerometer_X",
y_var = "Accelerometer_Y",
z_var = "Accelerometer_Z",
win_width_sec = 1,
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 |
A data frame of features in the specified epoch length
if (isTRUE(requireNamespace("read.gt3x"))) {
f <- system.file("extdata/TAS1H30182785_2019-09-17.gt3x", package = "read.gt3x")
d <- stats::setNames(
read.gt3x::read.gt3x(f, asDataFrame = TRUE, imputeZeroes = TRUE),
c("Timestamp", "Accelerometer_X", "Accelerometer_Y", "Accelerometer_Z")
)[1:30000, ]
utils::head(generic_features(d))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.