View source: R/calculate_counts.R
calculate_counts | R Documentation |
Calculate ActiGraph activity counts from raw acceleration data
by passing in a data frame with a time stamp, X, Y, and Z axis. This function
allows the ability to work with the raw data from other files, but the data
frame needs to have "start_time" and "stop_time" attributes. This is different
from the get_counts
function because it reads a raw
data frame rather than a path name to a GT3X file.
calculate_counts(raw, epoch, lfe_select = FALSE, tz = "UTC", verbose = FALSE)
raw |
data frame of raw acceleration data obtained from
|
epoch |
The epoch length for which the counts should be summed. |
lfe_select |
Apply the Actigraph Low Frequency Extension filter, Default: FALSE |
tz |
the desired timezone, Default: |
verbose |
Print the progress of the Actigraph raw data conversion to counts, Default: FALSE. |
Returns a data.frame containing the ActiGraph count values
f <- system.file("extdata/example.gt3x", package = "agcounts")
d <- read.gt3x::read.gt3x(f, asDataFrame = TRUE, imputeZeroes = TRUE)
calculate_counts(d, 60)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.