REDCapCAST/README.md

54 lines
3.6 KiB
Markdown
Raw Permalink Normal View History

2023-03-08 11:50:44 +01:00
<!-- badges: start -->
2023-06-07 14:03:31 +02:00
[![GitHub R package version](https://img.shields.io/github/r-package/v/agdamsbo/REDCapCAST)](https://github.com/agdamsbo/REDCapCAST)
[![CRAN/METACRAN](https://img.shields.io/cran/v/REDCapCAST)](https://CRAN.R-project.org/package=REDCapCAST)
2023-07-03 07:53:05 +02:00
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.8013984.svg)](https://doi.org/10.5281/zenodo.8013984)
2023-03-08 11:50:44 +01:00
[![R-CMD-check](https://github.com/agdamsbo/REDCapCAST/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/agdamsbo/REDCapCAST/actions/workflows/R-CMD-check.yaml)
2023-03-08 12:06:23 +01:00
[![Page deployed](https://github.com/agdamsbo/REDCapCAST/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/agdamsbo/REDCapCAST/actions/workflows/pages/pages-build-deployment)
2023-03-08 11:50:44 +01:00
[![Codecov test coverage](https://codecov.io/gh/agdamsbo/REDCapCAST/branch/master/graph/badge.svg)](https://app.codecov.io/gh/agdamsbo/REDCapCAST?branch=master)
2023-06-07 14:17:07 +02:00
[![CRAN downloads](https://cranlogs.r-pkg.org/badges/grand-total/REDCapCAST)](https://cran.r-project.org/package=REDCapCAST)
2023-03-09 07:56:05 +01:00
[![Lifecycle:
2023-03-09 07:57:27 +01:00
experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html)
2023-03-08 11:50:44 +01:00
<!-- badges: end -->
# REDCapCAST package <img src="man/figures/logo.png" align="right" />
2023-03-03 12:39:50 +01:00
REDCap Castellated data handling when using repeated instruments.
2022-12-21 08:31:45 +01:00
2023-12-20 14:47:57 +01:00
This package is a fork of [pegeler/REDCapRITS](https://github.com/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.
2022-12-21 08:32:38 +01:00
2023-04-13 10:57:04 +02:00
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](https://redcap-tools.github.io/) 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 original `REDCapRITS::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 of [`REDCapR::redcap_read()`](https://github.com/OuhscBbmc/REDCapR) with `REDCap_split()` to ease the export of REDCap data.
* `redcap_wider()`: pivots each data frame with repeated instruments to a wide format utilizing the [`tidyr::pivot_wider()`](https://tidyr.tidyverse.org/reference/pivot_wider.html) from the [tidyverse](https://www.tidyverse.org/).
2023-12-20 16:01:23 +01:00
* `easy_redcap()`: combines secure API key storage with the `keyring`-package, focused data retrieval and optional widening. This is the recommended approach for easy data access and analysis.
2023-04-13 10:57:04 +02:00
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.
2023-04-13 10:57:04 +02:00
## Installation
2023-12-20 14:47:57 +01:00
The package is available on CRAN. Install the latest version:
```
install.packages("REDCapCAST")
```
2023-04-13 10:57:04 +02:00
Install the latest version directly from GitHub:
```
remotes::install_github("agdamsbo/REDCapCAST")
```
2022-12-21 08:31:45 +01:00