The REDCapTidieR package provides an elegant way to import data from a REDCap project into an R environment. It builds upon the REDCapR package to query the REDCap API and then transforms the returned data into a set of tidy tibbles.
REDCapTidieR is especially useful for dealing with complex REDCap projects that are longitudinal or include repeating instruments or both.
The release version can be installed from CRAN.
You can install the development version of REDCapTidieR from GitHub:
Use read_redcap()
together with bind_tibbles()
to import data from all instruments into your environment.
REDCapTidieR supports labelled data using the labelled package, and it can generate statistical summaries using the skimr package.
Read the Getting Started vignette to learn more.
In addition, you can easily create collaborator-friendly Excel files using the write_redcap_xlsx()
function:
redcap_uri <- "https://my.institution.edu/redcap/api/"
token <- "123456789ABCDEF123456789ABCDEF04"
my_redcap_data <- read_redcap(redcap_uri, token)
write_redcap_xlsx(my_redcap_data, file = "my_redcap_data.xlsx")
To learn more about how to work with and customize the output, read the Exporting to Excel vignette.
We invite you to give feedback and collaborate with us! If you are familiar with GitHub and R packages, please feel free to submit a pull request. Please do let us know if REDCapTidieR fails for whatever reason with your database and submit a bug report by creating a GitHub issue.
Please note that this project is released with a Contributor Code of Conduct. By participating you agree to abide by its terms.
We’d like to thank the following folks for their advice and code contributions: Will Beasley and Paul Wildenhain.
This package was developed by the Children’s Hospital of Philadelphia Cell and Gene Therapy Informatics Team to support the needs of the Cellular Therapy and Transplant Section. The development was funded using the following sources:
Stephan Kadauke Start-up funds. Stephan Kadauke, PI, CHOP, 2018-2024
CHOP-based GMP cell manufacturing (MFG) for CAR T clinical trials. Stephan Grupp, PI; Stephan Kadauke, co-PI, CHOP, 2021-2023