REDCap / R Best Practices

REDCap (Research Data Capture) developed at Vanderbilt University Medical Center is a widely used web-hosted research data capture and reporting tool for web data and mobile devide data entry. It is build for tightly designed and quality-controlled experiments as well as for observational surveys. REDCap stores metadata that are useful to statistical analysis systems, and the system exports data manually to csv, R, Stata, SPSS, SAS and other systems and through an API that is used by many R users, using the redcapAPI , REDCapR, and REDCapExporter packages. This topic focuses on redcapAPI since it was developed at Vanderbilt and the team supporting it regularly engages with the REDCap development team.

The redcapAPI R package works closely with another R package developed at Vanderbilt, rccola which is used to safely manage user authentication for live REDCap interaction through an API.

This topic is intended to help R users develop best practices for working with data from REDCap, and to have discussions and deal with questions about R programming for working with REDCap. It is also intended to lead to a “meta” R package that encompasses these best practices.


Managing a project that involves REDCap with analysis in R is mostly ad-hoc. We would like to bring together best practices, and pull together resources / scripts to create a much smoother workflow, which eventually will become a CRAN package.

Outline of functions needed:

Structure

Creation- given a specification create all forms in REDCap database
Update- given a specification update a REDCap database to match the new specification
Export- given a REDCap API key, return a structure that can be used by Creation and Update

Quality Control - Given a REDCap API Key provide a markdown report of possible issues.

Missing Translation
Missing Suffix
HTML in variable Name
Test / Production mismatches (see 1c above)
Dropdowns with no entries
.... (Need a lot of help-- anyone with scripts to detect problems, please share)

Interface

An `rccola` compatible interface with proper labeling/ cleanup.

This is the basic outline. We are looking for top level discussion proposed purpose and any low level useful details that fit inside this scope, and pointers to other R resources related to REDCap.

Currently Available R Resources

6 Likes