Rmonize is an R package developed by Maelstrom Research to address some of the methodological and technical challenges in data harmonization and to promote a streamlined, reusable, and well documented harmonization workflow. To get started with Rmonize, you first need to get set up in R.

Install R and RStudio

To use Rmonize, you must install R (version 3.4 or higher), and you should have a basic familiarity with using R. While not required, we strongly recommend that you install RStudio, an integrated development environment for R that enhances the user experience and extends R functionality.

Install and load Rmonize

Before using Rmonize for the first time, you need to install the package. The latest stable version of the package can be installed from CRAN. The package is also available on Github. After initial installation, you will only need to reinstall Rmonize for updates. After installing Rmonize, load the package to use it each time you start a new session.

# To install Rmonize from CRAN:
install.packages("Rmonize")

# To install Rmonize from Github:
remotes::install_github(
  repo = "https://github.com/maelstrom-research/Rmonize",
  ref = "main")

# Load the package
library(Rmonize)

Rmonize uses two underlying packages, madshapR and fabR, which include helpful functions to work with data and metadata. Installing Rmonize also installs these two packages, and Rmonize functions automatically call madshapR and fabR where needed. In the vignettes, we will highlight some useful madshapR and fabR functions.

You must also have the ‘car’ package installed, which is used internally by Rmonize to recode variables, to avoid errors during processing.

# Install package car from CRAN
install.packages("car")

Rmonize and its related packages additionally use underlying packages from tidyverse, a useful and popular collection of R packages for data science, which we will use in the vignettes and suggest users also install.

Get help with Rmonize

You can get package and function documentation in R, and additional help and documentation are also provided on the website https://maelstrom-research.github.io/Rmonize-documentation/.

# Get package documentation in R
?Rmonize
help("Rmonize")

# Access the website with a function
Rmonize_website()

The package includes illustrative examples of input elements, outputs, and reports to demonstrate the structure and content of key elements in the Rmonize workflow. These examples are based on a use case with synthetic datasets from five studies to be harmonized, and they are also used in the Rmonize help files and vignettes.

# See available examples
names(Rmonize_examples)

# Downloadable templates are also available
Rmonize_templates()

You can report issues with the package on Github at https://github.com/maelstrom-research/Rmonize/issues.

Next steps

For a basic example of the harmonization processing workflow, see the vignette Simple example of data processing with Rmonize.

For more in-depth exploration of specific steps, see the vignettes and documentation:

  • Explore and prepare input datasets and data dictionaries (vignette)
  • Prepare the Data Processing Elements (online documentation)
  • Process inputs into harmonized outputs (vignette)
  • Summarize and secure harmonized outputs (vignette)