The goal of actilifecounts is to generate ActiGraph activity counts as described by Ali Neishabouri et al.
The actilifecounts R package is originally a translation of the python-based agcounts module.
Additional features of the actilifecounts package include the possibility of calculating activity counts from any accelerometer brand, with a more flexible approach to handle different sampling frequencies.
You can install the development version of actilifecounts from GitHub with:
# install.packages("devtools")
::install_github("jhmigueles/actilifecounts") devtools
This is a basic example which shows you how to generate activity counts.
library(actilifecounts)
# read accelerometer data (for example, from a csv file)
= "C:/mystudy/mydata/myfile.csv"
filename = data.table::fread(filename)
raw = get_counts(raw, sf = 100, epoch = 60, lfe_select = FALSE, verbose = TRUE) counts
If 3 axes are provided, the code assumes that the columns represent the X, Y, and Z axes in that order.