wt_baseline: Standard Deviation Non-Wear

View source: R/wt_baseline.R

wt_baselineR Documentation

Standard Deviation Non-Wear

Description

Calculate non-wear time from raw acceleration data by finding intervals in which the acceleration standard deviation is below a std_threshold value

Usage

wt_baseline(
  df,
  sample_rate = NULL,
  std_threshold = 0.004,
  min_interval = 90L,
  use_vmu = FALSE,
  verbose = TRUE
)

wt_xyz(
  df,
  sample_rate = NULL,
  std_threshold = 0.004,
  min_interval = 90L,
  use_vmu = FALSE,
  verbose = TRUE
)

wt_vmu(..., min_interval = 105L, use_vmu = TRUE)

Arguments

df

activity data, usually output from read.gt3x::read.gt3x(), and then imputed, or a data.frame of time/X/Y/Z

sample_rate

sample rate (integer) of the sampling frequency in Hertz from the header

std_threshold

standard deviation threshold in g

min_interval

minimum interval (in minutes) that determines non-wear

use_vmu

Use vector magnitude

verbose

print diagnostic messages

...

not used

Value

A tibble of time and indicator of wear

Note

See https://doi.org/10.1101/2020.07.08.20148015

Examples

if (isTRUE(wt_packages_installed())) {
  path = system.file("extdata", "TAS1H30182785_2019-09-17.gt3x",
                     package = "weartime")
  df = read.gt3x::read.gt3x(path, asDataFrame = TRUE,
                            imputeZeroes = TRUE,
                            verbose = TRUE)
  out = wt_baseline(df)
}

muschellij2/weartime documentation built on April 5, 2025, 4:01 a.m.