Learn R Programming

activAnalyzer

activAnalyzer is a Shiny app that has been developed to analyze daily physical behavior data recorded at the hip in adults using an ActiGraph accelerometer (.agd file from a GT3X, GT3X+, wGT3X+ or wGT3X-BT device). Once analysis is completed, the app allows exporting results to .csv files and generating a report of the measurement (in either an .html format or a .pdf format). All the configured inputs relevant for interpreting the results are recorded in the report. Be sure that the inputs that are configured when generating the report correspond to the analysis that was actually performed (in other words, avoid modifying the inputs after generating satisfactory results). In addition to an analysis of physical behavior, the app also allows to implement the Daily- and Clinical visit-PROactive Physical Activity in COPD (chronic obstructive pulmonary disease) instruments (D-PPAC and C-PPAC). Please read the user’s guide for details about how the app works.

Usage

There are three different ways to use the activAnalyzer app:

  • On the web via a shinyapps.io platform (stable version). For information, as indicated by RStudio, “shinyapps.io is secure-by-design. Each Shiny application runs in its own protected environment and access is always SSL encrypted”. Importantly, the app is hosted using a free account that allows to run apps for 25 hours per month. Thus, the availability of the app on the web is very dependent on the number of users as well as the time spent by each user on the app. Moreover, as computations when using the app can be quite intensive, it is possible that speed and stability of this online version of the app become sometimes compromised. For these reasons, this option should be considered as a way to have a quick look at how the app works. The other available options (please see below) will be more appropriate for working with the app on a regular basis. Of note, Google Chrome and Microsoft Edge browsers allow the app to work as expected but Mozilla Firefox does not seem to allow resetting all the inputs when required.
  • On your machine via a standalone desktop app that is downloadable from the SourceForge website (stable version, for Windows machines only). The standalone app has been developed using the framework DesktopDeployR made available by W. Lee Pang. Explanations related to this framework can be retrieved from a dedicated GitHub repository. Once the app is installed on your PC, you will have to double-click on the desktop app icon (if you chose this option during the installation process), which will run the R-portable version embedded in the app and then will launch the app in your default web browser with 127.0.0.1 as the value for the host parameter. This means that only your current machine will can access the app. You will can open only one session at a time. As written above, Google Chrome and Microsoft Edge browsers allow the app to work as expected but Mozilla Firefox does not seem to allow resetting all the inputs when required. Due to the extra work required to maintain such a format of the app up to date, it is not planned for the moment to provide updates for version 2.0.2 and newer versions.
  • On your machine via R software (version: $\ge$ 3.4.0), the RStudio environment, and the activAnalyzer package installable from CRAN (stable version) or from GitHub (development version). With version 2.0.1 and former versions, the app is launched in the RStudio window by default. For these versions, unfortunately only the RStudio version called Prairie Trillium [2022.02] and former versions allow to correctly quit the app from the RStudio window. Since version 2.0.2, the app is launched in the default web browser by default and could be used with the latest RStudio version (hopefully) without problems. Whatever the version used, to be able to generate a .pdf report, you will have to install the TinyTeX distribution. The first time you will generate a .pdf report, you will have to wait some time so that the required packages are installed on your machine. In short, after installing R and RStudio, you can run the following command lines in the RStudio console:
# For CRAN version:

## Code for installing the activAnalyzer package (stable version)
install.packages("activAnalyzer")

## Code for installing the TinyTex distribution
install.packages("tinytex")
tinytex::install_tinytex()
# For development version:

## Code for installing the activAnalyzer package (development version)
install.packages("devtools")
devtools::install_github("pydemull/activAnalyzer")

## Code for installing the TinyTex distribution
install.packages("tinytex")
tinytex::install_tinytex()

Example

To launch the app using R:

library(activAnalyzer)
activAnalyzer::run_app()

Code of Conduct

Please note that the activAnalyzer project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Copy Link

Version

Install

install.packages('activAnalyzer')

Monthly Downloads

370

Version

2.1.2

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Pierre-Yves de Müllenheim

Last Published

September 23rd, 2024

Functions in activAnalyzer (2.1.2)

create_fig_res_by_day

Create a figure with metrics shown for each day
create_fig_mvpa

Create a figure showing the mean daily MVPA time
create_fig_mx_summary

Create a radar plot for the mean or median MX metrics relating to the measurement of physical behavior
create_fig_mx_by_day

Create a radar plot for MX metrics relating to each day of the measurement of physical behavior
create_fig_ratio_mvpa_sed

Create a figure showing the mean daily MVPA/SED ratio
create_fig_pal

Create a figure showing the mean daily Physical Activity Level (PAL)
create_fig_sed

Create a figure showing the mean daily sedentary (SED) time
create_fig_steps

Create a figure showing the mean daily step count
create_flextable_summary

Create a formatted table of results
do_all_analyses

Do all analyses at once
get_guidelines_status

Get WHO physical activity guidelines status
plot_data_with_intensity

Plot accelerometer data for each day with both nonwear time and physical activity intensity categories
prepare_dataset

Prepare accelerometer data
get_pa_period_info

Get relevant missing physical activity information indicated by the user of the app
mark_wear_time

Mark dataset for nonwear/wear time
plot_data

Plot accelerometer data for each day
get_ig_results

Get intensity gradient values and graphics
run_app

Run the Shiny Application
recap_by_day

Summarize results by day
read_agd_raw

Read an *.agd file, with no post-processing
get_pal_status

Get FAO physical activity level (PAL) status (http://www.fao.org/3/y5686e/y5686e07.htm#bm07.3)
get_ratio_mvpa_sed_comment

Get comment about the MVPA/SED ratio
mark_intensity

Add intensity metrics
read_agd

Read activity counts from an *.agd file
rasch_transform

Compute Rasch transformation for PROactive scores
compute_bmr

Compute Basal Metabolic Rate (BMR)
compute_pro_score_cppac

Provide score for each question of the C-PPAC
compute_mx

Compute MX metric
compute_intensity_distri_metrics

Compute intensity distribution metrics
compute_accumulation_metrics

Compute activity accumulation metrics
average_results

Average results over valid days
compute_pro_score_dppac

Provide score for each question of the D-PPAC
compute_mets

Compute metabolic equivalent of task (MET) values
compute_peak_step_acc

Compute mean step accumulation (per min) from a given number of the best continous or discontinuous minutes
compute_pro_actigraph_score

Compute PROactive monitor-based physical activity score for C-PPAC tool