wt_hees_2013 | R Documentation |
Estimation of non-wear time periods based on Hees 2013 paper
wt_hees_2013(
df,
sample_rate = NULL,
min_non_wear_time_window = 60L,
window_overlap = 15L,
std_threshold = 0.003,
std_min_num_axes = 2L,
value_range_threshold = 0.05,
value_range_min_num_axes = 2L,
verbose = TRUE
)
wt_hees_2011(..., min_non_wear_time_window = 30L)
wt_hees_optimized(
df,
sample_rate = NULL,
min_non_wear_time_window = 135L,
window_overlap = 15L,
std_threshold = 0.007,
std_min_num_axes = 1L,
value_range_threshold = 0.001,
value_range_min_num_axes = 1L,
verbose = TRUE
)
df |
activity data, usually output from |
sample_rate |
sample rate (integer) of the sampling frequency in Hertz from the header |
min_non_wear_time_window |
int (optional) minimum window length in minutes to be classified as non-wear time |
window_overlap |
int (optional) basically the sliding window that progresses over the acceleration data. Defaults to 15 minutes. |
std_threshold |
float (optional) standard deviation threshold in g. Acceleration axes values below or equal this threshold can be considered non-wear time. Defaults to 3.0mg. |
std_min_num_axes |
int (optional) minimum number of axes used to check if acceleration values are below the |
value_range_threshold |
float (optional) value range threshold value in g. If the range of values within a window is below this threshold (meaning that there is very little change in acceleration over time) then this can be considered non wear time. Default to 50 mg. |
value_range_min_num_axes |
int (optional) minimum number of axes used to check if acceleration values range are below the value_range_mg_threshold value. Defaults to 2 axes; meaning that at least 2 axes need to have a value range below a threshold value to be considered non wear time |
verbose |
print diagnostic messages |
... |
not used |
A tibble of time and indicator of wear
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_hees_2013(df)
}
## Not run:
url = "https://github.com/THLfi/read.gt3x/files/3522749/GT3X%2B.01.day.gt3x.zip"
destfile = tempfile(fileext = ".zip")
dl = download.file(url, destfile = destfile)
gt3x_file = unzip(destfile, exdir = tempdir())
gt3x_file = gt3x_file[!grepl("__MACOSX", gt3x_file)]
path = gt3x_file
df = read.gt3x::read.gt3x(path, asDataFrame = TRUE,
imputeZeroes = TRUE,
verbose = TRUE)
out = wt_hees_2013(df)
df = resample_acc(df)
out_100 = wt_hees_2013(df)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.