calculate_counts: calculate_counts

View source: R/calculate_counts.R

calculate_countsR Documentation

calculate_counts

Description

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.

Usage

calculate_counts(raw, epoch, lfe_select = FALSE, tz = "UTC", verbose = FALSE)

Arguments

raw

data frame of raw acceleration data obtained from read.gt3x

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: UTC

verbose

Print the progress of the Actigraph raw data conversion to counts, Default: FALSE.

Value

Returns a data.frame containing the ActiGraph count values

Examples

    f <- system.file("extdata/example.gt3x", package = "agcounts")
    d <- read.gt3x::read.gt3x(f, asDataFrame = TRUE, imputeZeroes = TRUE)
    calculate_counts(d, 60)

bhelsel/agcounts documentation built on June 14, 2024, 12:41 a.m.