allofus: An R package to facilitate use of the All of Us Researcher Workbench
Louisa H. Smith, Robert Cavanaugh · medRxiv · 2024
ABSTRACT Objective We aimed to increase research and training capacity for the All of Us community through an R package designed to reduce barriers to entry to the Researcher Workbench. Materials and Methods We developed the open-source R package allofus , available on the R package repository CRAN. The package provides functions that address common challenges we encountered while working with All of Us Research Program data. We tested the package with standard R unit tests and in real research projects. Results We describe how the package functions allow for an efficient workflow. We demonstrate the package’s utility by creating a cohort of All of Us participants with one year of electronic health record data prior to survey completion and no previous diagnosis of Type 2 diabetes. Discussion Despite the program’s easy-to-use tools like the Cohort Builder, using All of Us data for complex research questions requires a relatively high level of technical expertise. We developed an initial set of functions that solve problems we experienced with our own research and in mentoring student projects. In conjunction with the tutorials provided with the package, these tools can reduce the barrier for entry into the All of Us research community. The package will continue to grow and develop with the All of Us Research Program. Conclusion The allofus R package can help build community research capacity by increasing access to the All of Us Research Program data, the efficiency of its use, and the rigor and reproducibility of the resulting research.