.github | ||
data | ||
data-raw | ||
inst | ||
man | ||
pkgdown/favicon | ||
R | ||
test-data/test_splitr | ||
tests | ||
vignettes | ||
_pkgdown.yml | ||
.DS_Store | ||
.gitignore | ||
.Rbuildignore | ||
.Renviron | ||
.Rprofile | ||
codecov.yml | ||
cran-comments.md | ||
CRAN-SUBMISSION | ||
DESCRIPTION | ||
LICENSE.md | ||
NAMESPACE | ||
NEWS.md | ||
README.md | ||
REDCapCAST.Rproj |
REDCapCAST package
REDCap Castellated data handling when using repeated instruments.
This package is a fork of pegeler/REDCapRITS. The REDCapRITS represents great and extensive work to handle castellated REDCap data in different programming languages. This fork is purely minded on R usage and includes a few implementations of the main REDCap_split
function.
The main goal for this project was to allow for a "minimal data" approach by allowing to filter records, instruments and variables in the export to only download data needed. I think this approach is desireable for handling sensitive, clinical data. No similar functionality is available from similar tools (like REDCapR
or REDCapTidieR
). Please refer to REDCap-Tools for other great tools.
Use and immprovements
This package is primarily relevant for working with longitudinal projects and/or projects using repeated instruments. Here is just a short descirption of the main functions:
-
REDcap_split()
: Works largely as the originalREDCapRITS::REDCap_split()
. It takes a REDCap dataset and metadata (data dictionary) to split the data set into a list of dataframes of instruments. -
read_redcap_tables()
: wraps the use ofREDCapR::redcap_read()
withREDCap_split()
to ease the export of REDCap data. -
redcap_wider()
: pivots each data frame with repeated instruments to a wide format utilizing thetidyr::pivot_wider()
from the tidyverse. -
easy_redcap()
: combines secure API key storage with thekeyring
-package, focused data retrieval and optional widening. This is the recommended approach for easy data access and analysis.
Compared to the original REDCapRITS
, all matching functions are improved to accept column naming of REDCap data from manual download or API export.
Future
The plan with this package is to be bundled with a Handbook on working with REDCap from R. I plan to also include functionality to assist in casting (yes, pun intended) the initial REDCap database.
Installation
The package is available on CRAN. Install the latest version:
install.packages("REDCapCAST")
Install the latest version directly from GitHub:
remotes::install_github("agdamsbo/REDCapCAST")