allofus R PackageThe goal of the allofus R package is to streamline the
use of R within the All of Us
Researcher Workbench. It has 4 primary goals:
tidyverse ecosystem of R
packages on the Researcher WorkbenchThe allofus R package was developed by Louisa Smith
and Rob Cavanaugh at Northeastern University and is
not affiliated with or endorsed by the All of Us Research
Program.
Install the released version of allofus from CRAN:
install.packages("allofus")Install the development version from Github:
install.packages("pak")
pak::pak("roux-ohdsi/allofus")Read through the getting started vignette to learn how to use the package.
The All of Us Researcher Workbench has migrated to a new, Verily-based platform (“Workbench 2.0”). A few things work differently there compared to the original workbench:
WORKSPACE_BUCKET set up
for you. Run aou_create_bucket() once per workspace to
create one (or aou_create_bucket(temporary = TRUE) for a
bucket that auto-deletes its contents after a couple of weeks) before
using aou_ls_bucket() and related functions.WORKSPACE_CDR and
GOOGLE_PROJECT are no longer injected as OS environment
variables on workbench 2.0. allofus resolves them
automatically via the wb CLI when the package loads, and
caches the result to ~/.aou-env so subsequent sessions
don’t need to re-resolve them.This was last tested on September 2, 2026, in a workbench 2.0 workspace using CDR version 9 and RStudio, with:
install.packages("pak")
pak::pak("roux-ohdsi/allofus")
library(allofus)
con <- aou_connect()Workspaces are configured differently as the workbench changes, so please let us know (via the “Issues” tab) if a new workspace doesn’t work with this code.
allofus package as:
Smith LH, Cavanaugh R (2024). “allofus: An R Package to Facilitate Use of the All of Us Researcher Workbench.” Journal of the American Medical Informatics Association, ocae198. doi:10.1093/jamia/ocae198.
or with
citation("allofus")Note: A pre-print can be found here: https://doi.org/10.1101/2024.04.10.24305611, or feel free to contact us if you can’t access the article.
We also encourage you to reference the specific version of the package you use for an analysis. You can look this up with
packageVersion("allofus")Please leave us comments, requests, and report bugs using the “Issues” tab on github.