REDCapCAST/index.html

220 lines
16 KiB
HTML

<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="Originally forked from the R part of REDCapRITS by Paul Egeler.
See &lt;https://github.com/pegeler/REDCapRITS&gt;.
REDCap database casting and handling of castellated data when using
repeated instruments and longitudinal projects. Keeps a focused data export
approach, by allowing to only export required data from the database.
REDCap (Research Electronic Data Capture) is a secure, web-based software
platform designed to support data capture for research studies, providing
1) an intuitive interface for validated data capture; 2) audit trails for
tracking data manipulation and export procedures; 3) automated export
procedures for seamless data downloads to common statistical packages; and
4) procedures for data integration and interoperability with external
sources (Harris et al (2009) &lt;doi:10.1016/j.jbi.2008.08.010&gt;;
Harris et al (2019) &lt;doi:10.1016/j.jbi.2019.103208&gt;).">
<title>REDCap Castellated Data Handling • REDCapCAST</title>
<!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png">
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="apple-touch-icon.png">
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="apple-touch-icon-60x60.png">
<script src="deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet">
<script src="deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous">
<!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="pkgdown.js"></script><meta property="og:title" content="REDCap Castellated Data Handling">
<meta property="og:description" content="Originally forked from the R part of REDCapRITS by Paul Egeler.
See &lt;https://github.com/pegeler/REDCapRITS&gt;.
REDCap database casting and handling of castellated data when using
repeated instruments and longitudinal projects. Keeps a focused data export
approach, by allowing to only export required data from the database.
REDCap (Research Electronic Data Capture) is a secure, web-based software
platform designed to support data capture for research studies, providing
1) an intuitive interface for validated data capture; 2) audit trails for
tracking data manipulation and export procedures; 3) automated export
procedures for seamless data downloads to common statistical packages; and
4) procedures for data integration and interoperability with external
sources (Harris et al (2009) &lt;doi:10.1016/j.jbi.2008.08.010&gt;;
Harris et al (2019) &lt;doi:10.1016/j.jbi.2019.103208&gt;).">
<meta property="og:image" content="https://agdamsbo.github.io/REDCapCAST/logo.png">
<!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
<a class="navbar-brand me-2" href="index.html">REDCapCAST</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">24.2.1</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div id="navbar" class="collapse navbar-collapse ms-3">
<ul class="navbar-nav me-auto">
<li class="nav-item">
<a class="nav-link" href="reference/index.html">Reference</a>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown-articles">Articles</a>
<div class="dropdown-menu" aria-labelledby="dropdown-articles">
<a class="dropdown-item" href="articles/Database-creation.html">Database-creation</a>
<a class="dropdown-item" href="articles/Introduction.html">Introduction</a>
<a class="dropdown-item" href="articles/Shiny-app.html">Shiny-app</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="news/index.html">Changelog</a>
</li>
</ul>
<form class="form-inline my-2 my-lg-0" role="search">
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="search.json" id="search-input" placeholder="Search for" autocomplete="off">
</form>
<ul class="navbar-nav">
<li class="nav-item">
<a class="external-link nav-link" href="https://github.com/agdamsbo/REDCapCAST/" aria-label="github">
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div>
</div>
</nav><div class="container template-home">
<div class="row">
<main id="main" class="col-md-9">
<div class="section level1">
<div class="page-header">
<img src="logo.png" class="logo" alt=""><h1 id="redcapcast-package-">REDCapCAST package <a class="anchor" aria-label="anchor" href="#redcapcast-package-"></a>
</h1>
</div>
<p>REDCap database casting and handling of castellated data when using repeated instruments and longitudinal projects.</p>
<p>This package is a fork of <a href="https://github.com/pegeler/REDCapRITS" class="external-link">pegeler/REDCapRITS</a>. 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 <code>REDCap_split</code> function.</p>
<p>This package is very much to be seen as an attempt at a R-to-REDCap-to-R foundry for handling both the transition from dataset/variable list to database and the other way, from REDCap database to a tidy dataset. The goal was also 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 desirable for handling sensitive, clinical data. Please refer to <a href="https://redcap-tools.github.io/" class="external-link">REDCap-Tools</a> for other great tools for working with REDCap in R.</p>
<div class="section level2">
<h2 id="use-and-immprovements">Use and immprovements<a class="anchor" aria-label="anchor" href="#use-and-immprovements"></a>
</h2>
<p>Here is just a short description of the main functions:</p>
<ul>
<li><p><code>REDcap_split()</code>: Works largely as the original <code>REDCapRITS::REDCap_split()</code>. It takes a REDCap dataset and metadata (data dictionary) to split the data set into a list of dataframes of instruments.</p></li>
<li><p><code><a href="reference/read_redcap_tables.html">read_redcap_tables()</a></code>: wraps the use of <a href="https://github.com/OuhscBbmc/REDCapR" class="external-link"><code>REDCapR::redcap_read()</code></a> with <code><a href="reference/REDCap_split.html">REDCap_split()</a></code> to ease the export of REDCap data. Default output is a list of data frames with one data frame for each REDCap instrument.</p></li>
<li><p><code><a href="reference/redcap_wider.html">redcap_wider()</a></code>: joins and pivots a list of data frames with repeated instruments to a wide format utilizing the <a href="https://tidyr.tidyverse.org/reference/pivot_wider.html" class="external-link"><code>tidyr::pivot_wider()</code></a> from the <a href="https://www.tidyverse.org/" class="external-link">tidyverse</a>.</p></li>
<li><p><code><a href="reference/easy_redcap.html">easy_redcap()</a></code>: combines secure API key storage with the <code>keyring</code>-package, focused data retrieval and optional widening. This is the recommended approach for easy data access and analysis.</p></li>
<li><p><code><a href="reference/ds2dd_detailed.html">ds2dd_detailed()</a></code>: Converts a data set to a data dictionary for upload to a new REDCap database. Variables (fields) and instruments in a REDCap data base are defined by this data dictionary.</p></li>
<li><p><code><a href="reference/shiny_cast.html">shiny_cast()</a></code>: <a href="https://www.rstudio.com/products/shiny/" class="external-link">Shiny</a> application to ease the process of converting a spreadsheet/data set to a REDCap database. The app runs locally and data is transferred securely. You can just create and upload the data dictionary, but you can also transfer the given data in the same process.</p></li>
</ul>
</div>
<div class="section level2">
<h2 id="future">Future<a class="anchor" aria-label="anchor" href="#future"></a>
</h2>
<p>The plan with this package is to be bundled with a Handbook on working with REDCap from R. This work is in progress but is limited by the time available. Please feel free to contact me or create and issue with ideas for future additions.</p>
</div>
<div class="section level2">
<h2 id="installation">Installation<a class="anchor" aria-label="anchor" href="#installation"></a>
</h2>
<p>The package is available on CRAN. Install the latest version:</p>
<pre><code><span><span class="fu"><a href="https://rdrr.io/r/utils/install.packages.html" class="external-link">install.packages</a></span><span class="op">(</span><span class="st">"REDCapCAST"</span><span class="op">)</span></span></code></pre>
<p>Install the latest version directly from GitHub:</p>
<pre><code><span><span class="fu">remotes</span><span class="fu">::</span><span class="fu"><a href="https://remotes.r-lib.org/reference/install_github.html" class="external-link">install_github</a></span><span class="op">(</span><span class="st">"agdamsbo/REDCapCAST"</span><span class="op">)</span></span></code></pre>
</div>
<div class="section level2">
<h2 id="code-of-conduct">Code of Conduct<a class="anchor" aria-label="anchor" href="#code-of-conduct"></a>
</h2>
<p>Please note that the REDCapCAST project is released with a <a href="https://agdamsbo.github.io/REDCapCAST/CODE_OF_CONDUCT.html">Contributor Code of Conduct</a>. By contributing to this project, you agree to abide by its terms.</p>
</div>
</div>
</main><aside class="col-md-3"><div class="links">
<h2 data-toc-skip>Links</h2>
<ul class="list-unstyled">
<li><a href="https://cloud.r-project.org/package=REDCapCAST" class="external-link">View on CRAN</a></li>
<li><a href="https://github.com/agdamsbo/REDCapCAST/" class="external-link">Browse source code</a></li>
<li><a href="https://github.com/agdamsbo/REDCapCAST/issues" class="external-link">Report a bug</a></li>
</ul>
</div>
<div class="license">
<h2 data-toc-skip>License</h2>
<ul class="list-unstyled">
<li><a href="LICENSE.html">Full license</a></li>
<li><small>GPL (&gt;= 3)</small></li>
</ul>
</div>
<div class="community">
<h2 data-toc-skip>Community</h2>
<ul class="list-unstyled">
<li><a href="CODE_OF_CONDUCT.html">Code of conduct</a></li>
</ul>
</div>
<div class="citation">
<h2 data-toc-skip>Citation</h2>
<ul class="list-unstyled">
<li><a href="authors.html#citation">Citing REDCapCAST</a></li>
</ul>
</div>
<div class="developers">
<h2 data-toc-skip>Developers</h2>
<ul class="list-unstyled">
<li>Andreas Gammelgaard Damsbo <br><small class="roles"> Author, maintainer </small> <a href="https://orcid.org/0000-0002-7559-1154" target="orcid.widget" aria-label="ORCID" class="external-link"><span class="fab fa-orcid orcid" aria-hidden="true"></span></a> </li>
<li>Paul Egeler <br><small class="roles"> Author </small> <a href="https://orcid.org/0000-0001-6948-9498" target="orcid.widget" aria-label="ORCID" class="external-link"><span class="fab fa-orcid orcid" aria-hidden="true"></span></a> </li>
</ul>
</div>
<div class="dev-status">
<h2 data-toc-skip>Dev status</h2>
<ul class="list-unstyled">
<li><a href="https://github.com/agdamsbo/REDCapCAST" class="external-link"><img src="https://img.shields.io/github/r-package/v/agdamsbo/REDCapCAST" alt="GitHub R package version"></a></li>
<li><a href="https://CRAN.R-project.org/package=REDCapCAST" class="external-link"><img src="https://img.shields.io/cran/v/REDCapCAST" alt="CRAN/METACRAN"></a></li>
<li><a href="https://doi.org/10.5281/zenodo.8013984" class="external-link"><img src="https://zenodo.org/badge/DOI/10.5281/zenodo.8013984.svg" alt="DOI"></a></li>
<li><a href="https://github.com/agdamsbo/REDCapCAST/actions/workflows/R-CMD-check.yaml" class="external-link"><img src="https://github.com/agdamsbo/REDCapCAST/actions/workflows/R-CMD-check.yaml/badge.svg" alt="R-CMD-check"></a></li>
<li><a href="https://github.com/agdamsbo/REDCapCAST/actions/workflows/pages/pages-build-deployment" class="external-link"><img src="https://github.com/agdamsbo/REDCapCAST/actions/workflows/pages/pages-build-deployment/badge.svg" alt="Page deployed"></a></li>
<li><a href="https://app.codecov.io/gh/agdamsbo/REDCapCAST?branch=master" class="external-link"><img src="https://codecov.io/gh/agdamsbo/REDCapCAST/branch/master/graph/badge.svg" alt="Codecov test coverage"></a></li>
<li><a href="https://cran.r-project.org/package=REDCapCAST" class="external-link"><img src="https://cranlogs.r-pkg.org/badges/grand-total/REDCapCAST" alt="CRAN downloads"></a></li>
<li><a href="https://lifecycle.r-lib.org/articles/stages.html" class="external-link"><img src="https://img.shields.io/badge/lifecycle-experimental-orange.svg" alt="Lifecycle: experimental"></a></li>
</ul>
</div>
</aside>
</div>
<footer><div class="pkgdown-footer-left">
<p></p>
<p>Developed by Andreas Gammelgaard Damsbo, Paul Egeler.</p>
</div>
<div class="pkgdown-footer-right">
<p></p>
<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
</div>
</body>
</html>