Title: | Generate Activity Counts from Raw Accelerometer Data |
---|---|
Description: | A tool to obtain activity counts, originally a translation of the 'python' package 'agcounts' <https://github.com/actigraph/agcounts>. This tool allows the processing of data from any accelerometer brand, with a more flexible approach to handle different sampling frequencies. |
Authors: | Jairo Hidalgo Migueles |
Maintainer: | Jairo Hidalgo Migueles <[email protected]> |
License: | LGPL (>= 3) |
Version: | 1.1.1 |
Built: | 2024-11-02 03:42:17 UTC |
Source: | https://github.com/jhmigueles/actilifecounts |
Bandpass filter for actigraph downsampled data
bpf_filter(downsample_data = c(), verbose = FALSE)
bpf_filter(downsample_data = c(), verbose = FALSE)
downsample_data |
Matrix containing downsampled data |
verbose |
Print diagnostic messages |
The filtered data
Jairo Hidalgo Migueles
Ali Neishabouri et al. DOI: https://doi.org/10.21203/rs.3.rs-1370418/v1
get_counts
get_counts(raw, sf, epoch, lfe_select = FALSE, verbose = FALSE)
get_counts(raw, sf, epoch, lfe_select = FALSE, verbose = FALSE)
raw |
Matrix containing raw data (3 columns, no timestamp should be included) |
sf |
Sample frequency of raw data (Hz) |
epoch |
Epoch length to aggregate activity counts |
lfe_select |
False for regular trimming, True for allow more noise |
verbose |
Print diagnostic messages |
Matrix containing the count values per epoch in each axis and vector magnitude
Jairo Hidalgo Migueles
Ali Neishabouri et al. DOI: https://doi.org/10.21203/rs.3.rs-1370418/v1
Get data back to 10 Hz for accumulation
resample_10hz(trim_data = c(), verbose = FALSE)
resample_10hz(trim_data = c(), verbose = FALSE)
trim_data |
Matrix containing the trimmed/thresholded data |
verbose |
Print diagnostic messages |
Resampled data
Jairo Hidalgo Migueles
Ali Neishabouri et al. DOI: https://doi.org/10.21203/rs.3.rs-1370418/v1
Resample the raw data.
resample_30hz(raw = c(), sf = 30, verbose = FALSE)
resample_30hz(raw = c(), sf = 30, verbose = FALSE)
raw |
Matrix containing raw data |
sf |
Sample frequency of raw data (Hz) |
verbose |
Print diagnostic messages |
resampled_data
Jairo Hidalgo Migueles
Ali Neishabouri et al. DOI: https://doi.org/10.21203/rs.3.rs-1370418/v1
Generate counts per epoch.
sum_counts(downsample_10hz, epoch = 60, verbose = FALSE)
sum_counts(downsample_10hz, epoch = 60, verbose = FALSE)
downsample_10hz |
Matrix containing downsampled to 10hz data |
epoch |
Used to compute how many raw samples are used for computing an epoch |
verbose |
Used to compute how many raw samples are used for computing an epoch |
Matrix with counts per epoch in the 3 axes
Jairo Hidalgo Migueles
Ali Neishabouri et al. DOI: https://doi.org/10.21203/rs.3.rs-1370418/v1
trim_data
trim_data(bpf_data = c(), lfe_select = FALSE, verbose = FALSE)
trim_data(bpf_data = c(), lfe_select = FALSE, verbose = FALSE)
bpf_data |
Matrix containing filtered data |
lfe_select |
False for regular trimming, True for allow more noise |
verbose |
Print diagnostic messages |
The trimmed/thresholded data
Jairo Hidalgo Migueles
Ali Neishabouri et al. DOI: https://doi.org/10.21203/rs.3.rs-1370418/v1