Activity Index Calculation using Raw 'Accelerometry' Data

Reads raw 'accelerometry' from 'GT3X+' data and plain table data to calculate Activity Index from 'Bai et al.' (2016) . The Activity Index refers to the square root of the second-level average variance of the three 'accelerometry' axes.

@muschellij2 badges: Travis buildstatus AppVeyor buildstatus

ActivityIndex is an R package which provides functions to read and process raw accelerometry data.


ActivityIndex provides R functions to read raw accelerometry data collected by accelerometers. Specifically, it can directly handle .csv data files generated by accelerometer model GT3X+ and software ActiLife by ActiGraph. The package also provides functions to calculate summarizing metrics such as Activity Index (AI), using the raw data.

The AI is a way of summarizing densely sampled accelerometry data into given epochs (such as every 1 second or every 15 seconds, etc). Essentially, AI describes the variability of the raw acceleration signals, after normalizing it using systematic noise of the signal. AI is an evolvement of the original metric, Activity Intensity, proposed in the paper Normalization and extraction of interpretable metrics from raw accelerometry data by J. Bai et al (2014). The AI addresses some limitation of the orignal Activity Intensity, and has favorable properties. More details on these properties and a direct comparison of AI versus other metrics such as Activity Count could be found in the paper An Activity Index for Raw Accelerometry Data and Its Comparison with Other Activity Metrics.

Package Installation

ActivityIndex software can be installed via GitHub. Users should have R installed on their computer before installing ActivityIndex.

Install devtools package

To install ActivityIndex package via GitHub, the user must have installed devtools, which could be completed by using the following R command


Install ActivityIndex package

The following R command can be used to install the latest version of ActivityIndex via GitHub:


ActivityIndex User Manual

The ActivityIndex package includes a vignette to demonstrate a typical work flow of computing AI. The vignette can either be accessed by R command


and interactively browsing or going to

Further Questions

Please contact the author and maintainer Jiawei Bai (jbai [at] jhsph [dot] edu) or open an issue at GitHub.


ActivityIndex 0.3.6

  • Example for computeActivityIndex added, taken from vignette.
  • print methods for S3 ActivityIndex object created.

ActivityIndex 0.3.5

  • Vignette now in Markdown.
  • Site is built using pkgdown::build_site.
  • CRAN release version.

ActivityIndex 0.3.4

  • Adding tests with testthat.
  • Added conversions to data.table when necessary.
  • Fixing docs with \code accidentally in there.

ActivityIndex 0.3.3

  • Added a file to track changes to the package.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.3.7 by Jiawei Bai, a year ago

Browse source code at

Authors: Jiawei Bai [cre, aut] , John Muschelli [ctb]

Documentation:   PDF Manual  

GPL-3 license

Imports matrixStats, data.table, utils, R.utils

Suggests knitr, testthat, graphics, rmarkdown

See at CRAN