Compare commits

..

No commits in common. "f2d5b8f6007b7f953c525e58e8b47ec8d702d9be" and "32bab4ea0ba141061f613a880aa8239c559fba43" have entirely different histories.

11 changed files with 167 additions and 141 deletions

View File

@ -12,4 +12,3 @@
^LICENSE\.md$ ^LICENSE\.md$
^logo\.R$ ^logo\.R$
^cran-comments\.md$ ^cran-comments\.md$
^CRAN-SUBMISSION$

View File

@ -1,3 +0,0 @@
Version: 23.6.1
Date: 2023-06-02 12:31:16 UTC
SHA: 32bab4ea0ba141061f613a880aa8239c559fba43

View File

@ -5,20 +5,19 @@ Authors@R: c(
person("Andreas Gammelgaard", "Damsbo", email = "agdamsbo@clin.au.dk", role = c("aut", "cre"), person("Andreas Gammelgaard", "Damsbo", email = "agdamsbo@clin.au.dk", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-7559-1154")), comment = c(ORCID = "0000-0002-7559-1154")),
person("Paul", "Egeler", email = "paul.egeler@spectrumhealth.org", role = "aut")) person("Paul", "Egeler", email = "paul.egeler@spectrumhealth.org", role = "aut"))
Description: Forked from 'REDCapRITS' by Paul Egeler and Spectrum Health. Description: Forked from REDCapRITS by Paul Egeler and Spectrum Health.
See <https://github.com/SpectrumHealthResearch/REDCapRITS>. See <https://github.com/SpectrumHealthResearch/REDCapRITS>.
Handles castellated datasets from 'REDCap' projects with repeating instruments. Handles castellated datasets from REDCap projects with repeating instruments.
Assists in casting tidy tables from raw 'REDCap' data exports for each Assists in splitting raw REDCap data exports to base table and child tables
repeated instrument. Keeps a focused data export approach, by allowing to for each repeated instrument. Keeps a focused data export approach, by
only export required data from the database. allowing to only export required data from the database.
'REDCap' (Research Electronic Data Capture) is a secure, web-based software REDCap (Research Electronic Data Capture) is a secure, web-based software
platform designed to support data capture for research studies, providing platform designed to support data capture for research studies, providing
1) an intuitive interface for validated data capture; 2) audit trails for 1) an intuitive interface for validated data capture; 2) audit trails for
tracking data manipulation and export procedures; 3) automated export tracking data manipulation and export procedures; 3) automated export
procedures for seamless data downloads to common statistical packages; and procedures for seamless data downloads to common statistical packages; and
4) procedures for data integration and interoperability with external sources 4) procedures for data integration and interoperability with external sources
(Harris et al (2009) <doi:10.1016/j.jbi.2008.08.010>; (<doi:10.1016/j.jbi.2008.08.010>; <doi:10.1016/j.jbi.2019.103208>).
Harris et al (2019) <doi:10.1016/j.jbi.2019.103208>).
Depends: R (>= 3.4.0) Depends: R (>= 3.4.0)
Suggests: Suggests:
spelling, spelling,

View File

@ -58,19 +58,17 @@
#' #'
#' # You must set the working directory first since the REDCap data export #' # You must set the working directory first since the REDCap data export
#' # script contains relative file references. #' # script contains relative file references.
#' old <- getwd()
#' setwd("/path/to/data/") #' setwd("/path/to/data/")
#' #'
#' # Run the data export script supplied by REDCap. #' # Run the data export script supplied by REDCap.
#' # This will create a data.frame of your records called 'data' #' # This will create a data.frame of your records called 'data'
#' source("ExampleProject_R_2018-06-03_1700.r") #' source("ExampleProject_R_2018-06-03_1700.r")
#' #'
#' # Get the metadatan #' # Get the metadata
#' metadata <- read.csv("ExampleProject_DataDictionary_2018-06-03.csv") #' metadata <- read.csv("ExampleProject_DataDictionary_2018-06-03.csv")
#' #'
#' # Split the tables #' # Split the tables
#' REDCapRITS::REDCap_split(data, metadata) #' REDCapRITS::REDCap_split(data, metadata)
#' setwd(old)
#' } #' }
#' @return A list of \code{"data.frame"}s. The number of tables will differ #' @return A list of \code{"data.frame"}s. The number of tables will differ
#' depending on the \code{forms} option selected. #' depending on the \code{forms} option selected.

View File

@ -98,23 +98,23 @@ demonstration of the functions.</p>
</h2> </h2>
<div class="sourceCode" id="cb2"><pre class="downlit sourceCode r"> <div class="sourceCode" id="cb2"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">redcapcast_data</span> <span class="op">|&gt;</span> <span class="fu">gt</span><span class="fu">::</span><span class="fu"><a href="https://gt.rstudio.com/reference/gt.html" class="external-link">gt</a></span><span class="op">(</span><span class="op">)</span></span></code></pre></div> <code class="sourceCode R"><span><span class="va">redcapcast_data</span> <span class="op">|&gt;</span> <span class="fu">gt</span><span class="fu">::</span><span class="fu"><a href="https://gt.rstudio.com/reference/gt.html" class="external-link">gt</a></span><span class="op">(</span><span class="op">)</span></span></code></pre></div>
<div id="ixntfrihfd" style="padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;"> <div id="keomoihxmb" style="padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;">
<style>#ixntfrihfd table { <style>#keomoihxmb table {
font-family: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; font-family: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
#ixntfrihfd thead, #ixntfrihfd tbody, #ixntfrihfd tfoot, #ixntfrihfd tr, #ixntfrihfd td, #ixntfrihfd th { #keomoihxmb thead, #keomoihxmb tbody, #keomoihxmb tfoot, #keomoihxmb tr, #keomoihxmb td, #keomoihxmb th {
border-style: none; border-style: none;
} }
#ixntfrihfd p { #keomoihxmb p {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
#ixntfrihfd .gt_table { #keomoihxmb .gt_table {
display: table; display: table;
border-collapse: collapse; border-collapse: collapse;
line-height: normal; line-height: normal;
@ -140,12 +140,12 @@ demonstration of the functions.</p>
border-left-color: #D3D3D3; border-left-color: #D3D3D3;
} }
#ixntfrihfd .gt_caption { #keomoihxmb .gt_caption {
padding-top: 4px; padding-top: 4px;
padding-bottom: 4px; padding-bottom: 4px;
} }
#ixntfrihfd .gt_title { #keomoihxmb .gt_title {
color: #333333; color: #333333;
font-size: 125%; font-size: 125%;
font-weight: initial; font-weight: initial;
@ -157,7 +157,7 @@ demonstration of the functions.</p>
border-bottom-width: 0; border-bottom-width: 0;
} }
#ixntfrihfd .gt_subtitle { #keomoihxmb .gt_subtitle {
color: #333333; color: #333333;
font-size: 85%; font-size: 85%;
font-weight: initial; font-weight: initial;
@ -169,7 +169,7 @@ demonstration of the functions.</p>
border-top-width: 0; border-top-width: 0;
} }
#ixntfrihfd .gt_heading { #keomoihxmb .gt_heading {
background-color: #FFFFFF; background-color: #FFFFFF;
text-align: center; text-align: center;
border-bottom-color: #FFFFFF; border-bottom-color: #FFFFFF;
@ -181,13 +181,13 @@ demonstration of the functions.</p>
border-right-color: #D3D3D3; border-right-color: #D3D3D3;
} }
#ixntfrihfd .gt_bottom_border { #keomoihxmb .gt_bottom_border {
border-bottom-style: solid; border-bottom-style: solid;
border-bottom-width: 2px; border-bottom-width: 2px;
border-bottom-color: #D3D3D3; border-bottom-color: #D3D3D3;
} }
#ixntfrihfd .gt_col_headings { #keomoihxmb .gt_col_headings {
border-top-style: solid; border-top-style: solid;
border-top-width: 2px; border-top-width: 2px;
border-top-color: #D3D3D3; border-top-color: #D3D3D3;
@ -202,7 +202,7 @@ demonstration of the functions.</p>
border-right-color: #D3D3D3; border-right-color: #D3D3D3;
} }
#ixntfrihfd .gt_col_heading { #keomoihxmb .gt_col_heading {
color: #333333; color: #333333;
background-color: #FFFFFF; background-color: #FFFFFF;
font-size: 100%; font-size: 100%;
@ -222,7 +222,7 @@ demonstration of the functions.</p>
overflow-x: hidden; overflow-x: hidden;
} }
#ixntfrihfd .gt_column_spanner_outer { #keomoihxmb .gt_column_spanner_outer {
color: #333333; color: #333333;
background-color: #FFFFFF; background-color: #FFFFFF;
font-size: 100%; font-size: 100%;
@ -234,15 +234,15 @@ demonstration of the functions.</p>
padding-right: 4px; padding-right: 4px;
} }
#ixntfrihfd .gt_column_spanner_outer:first-child { #keomoihxmb .gt_column_spanner_outer:first-child {
padding-left: 0; padding-left: 0;
} }
#ixntfrihfd .gt_column_spanner_outer:last-child { #keomoihxmb .gt_column_spanner_outer:last-child {
padding-right: 0; padding-right: 0;
} }
#ixntfrihfd .gt_column_spanner { #keomoihxmb .gt_column_spanner {
border-bottom-style: solid; border-bottom-style: solid;
border-bottom-width: 2px; border-bottom-width: 2px;
border-bottom-color: #D3D3D3; border-bottom-color: #D3D3D3;
@ -254,11 +254,11 @@ demonstration of the functions.</p>
width: 100%; width: 100%;
} }
#ixntfrihfd .gt_spanner_row { #keomoihxmb .gt_spanner_row {
border-bottom-style: hidden; border-bottom-style: hidden;
} }
#ixntfrihfd .gt_group_heading { #keomoihxmb .gt_group_heading {
padding-top: 8px; padding-top: 8px;
padding-bottom: 8px; padding-bottom: 8px;
padding-left: 5px; padding-left: 5px;
@ -284,7 +284,7 @@ demonstration of the functions.</p>
text-align: left; text-align: left;
} }
#ixntfrihfd .gt_empty_group_heading { #keomoihxmb .gt_empty_group_heading {
padding: 0.5px; padding: 0.5px;
color: #333333; color: #333333;
background-color: #FFFFFF; background-color: #FFFFFF;
@ -299,15 +299,15 @@ demonstration of the functions.</p>
vertical-align: middle; vertical-align: middle;
} }
#ixntfrihfd .gt_from_md > :first-child { #keomoihxmb .gt_from_md > :first-child {
margin-top: 0; margin-top: 0;
} }
#ixntfrihfd .gt_from_md > :last-child { #keomoihxmb .gt_from_md > :last-child {
margin-bottom: 0; margin-bottom: 0;
} }
#ixntfrihfd .gt_row { #keomoihxmb .gt_row {
padding-top: 8px; padding-top: 8px;
padding-bottom: 8px; padding-bottom: 8px;
padding-left: 5px; padding-left: 5px;
@ -326,7 +326,7 @@ demonstration of the functions.</p>
overflow-x: hidden; overflow-x: hidden;
} }
#ixntfrihfd .gt_stub { #keomoihxmb .gt_stub {
color: #333333; color: #333333;
background-color: #FFFFFF; background-color: #FFFFFF;
font-size: 100%; font-size: 100%;
@ -339,7 +339,7 @@ demonstration of the functions.</p>
padding-right: 5px; padding-right: 5px;
} }
#ixntfrihfd .gt_stub_row_group { #keomoihxmb .gt_stub_row_group {
color: #333333; color: #333333;
background-color: #FFFFFF; background-color: #FFFFFF;
font-size: 100%; font-size: 100%;
@ -353,15 +353,15 @@ demonstration of the functions.</p>
vertical-align: top; vertical-align: top;
} }
#ixntfrihfd .gt_row_group_first td { #keomoihxmb .gt_row_group_first td {
border-top-width: 2px; border-top-width: 2px;
} }
#ixntfrihfd .gt_row_group_first th { #keomoihxmb .gt_row_group_first th {
border-top-width: 2px; border-top-width: 2px;
} }
#ixntfrihfd .gt_summary_row { #keomoihxmb .gt_summary_row {
color: #333333; color: #333333;
background-color: #FFFFFF; background-color: #FFFFFF;
text-transform: inherit; text-transform: inherit;
@ -371,16 +371,16 @@ demonstration of the functions.</p>
padding-right: 5px; padding-right: 5px;
} }
#ixntfrihfd .gt_first_summary_row { #keomoihxmb .gt_first_summary_row {
border-top-style: solid; border-top-style: solid;
border-top-color: #D3D3D3; border-top-color: #D3D3D3;
} }
#ixntfrihfd .gt_first_summary_row.thick { #keomoihxmb .gt_first_summary_row.thick {
border-top-width: 2px; border-top-width: 2px;
} }
#ixntfrihfd .gt_last_summary_row { #keomoihxmb .gt_last_summary_row {
padding-top: 8px; padding-top: 8px;
padding-bottom: 8px; padding-bottom: 8px;
padding-left: 5px; padding-left: 5px;
@ -390,7 +390,7 @@ demonstration of the functions.</p>
border-bottom-color: #D3D3D3; border-bottom-color: #D3D3D3;
} }
#ixntfrihfd .gt_grand_summary_row { #keomoihxmb .gt_grand_summary_row {
color: #333333; color: #333333;
background-color: #FFFFFF; background-color: #FFFFFF;
text-transform: inherit; text-transform: inherit;
@ -400,7 +400,7 @@ demonstration of the functions.</p>
padding-right: 5px; padding-right: 5px;
} }
#ixntfrihfd .gt_first_grand_summary_row { #keomoihxmb .gt_first_grand_summary_row {
padding-top: 8px; padding-top: 8px;
padding-bottom: 8px; padding-bottom: 8px;
padding-left: 5px; padding-left: 5px;
@ -410,7 +410,7 @@ demonstration of the functions.</p>
border-top-color: #D3D3D3; border-top-color: #D3D3D3;
} }
#ixntfrihfd .gt_last_grand_summary_row_top { #keomoihxmb .gt_last_grand_summary_row_top {
padding-top: 8px; padding-top: 8px;
padding-bottom: 8px; padding-bottom: 8px;
padding-left: 5px; padding-left: 5px;
@ -420,11 +420,11 @@ demonstration of the functions.</p>
border-bottom-color: #D3D3D3; border-bottom-color: #D3D3D3;
} }
#ixntfrihfd .gt_striped { #keomoihxmb .gt_striped {
background-color: rgba(128, 128, 128, 0.05); background-color: rgba(128, 128, 128, 0.05);
} }
#ixntfrihfd .gt_table_body { #keomoihxmb .gt_table_body {
border-top-style: solid; border-top-style: solid;
border-top-width: 2px; border-top-width: 2px;
border-top-color: #D3D3D3; border-top-color: #D3D3D3;
@ -433,7 +433,7 @@ demonstration of the functions.</p>
border-bottom-color: #D3D3D3; border-bottom-color: #D3D3D3;
} }
#ixntfrihfd .gt_footnotes { #keomoihxmb .gt_footnotes {
color: #333333; color: #333333;
background-color: #FFFFFF; background-color: #FFFFFF;
border-bottom-style: none; border-bottom-style: none;
@ -447,7 +447,7 @@ demonstration of the functions.</p>
border-right-color: #D3D3D3; border-right-color: #D3D3D3;
} }
#ixntfrihfd .gt_footnote { #keomoihxmb .gt_footnote {
margin: 0px; margin: 0px;
font-size: 90%; font-size: 90%;
padding-top: 4px; padding-top: 4px;
@ -456,7 +456,7 @@ demonstration of the functions.</p>
padding-right: 5px; padding-right: 5px;
} }
#ixntfrihfd .gt_sourcenotes { #keomoihxmb .gt_sourcenotes {
color: #333333; color: #333333;
background-color: #FFFFFF; background-color: #FFFFFF;
border-bottom-style: none; border-bottom-style: none;
@ -470,7 +470,7 @@ demonstration of the functions.</p>
border-right-color: #D3D3D3; border-right-color: #D3D3D3;
} }
#ixntfrihfd .gt_sourcenote { #keomoihxmb .gt_sourcenote {
font-size: 90%; font-size: 90%;
padding-top: 4px; padding-top: 4px;
padding-bottom: 4px; padding-bottom: 4px;
@ -478,63 +478,63 @@ demonstration of the functions.</p>
padding-right: 5px; padding-right: 5px;
} }
#ixntfrihfd .gt_left { #keomoihxmb .gt_left {
text-align: left; text-align: left;
} }
#ixntfrihfd .gt_center { #keomoihxmb .gt_center {
text-align: center; text-align: center;
} }
#ixntfrihfd .gt_right { #keomoihxmb .gt_right {
text-align: right; text-align: right;
font-variant-numeric: tabular-nums; font-variant-numeric: tabular-nums;
} }
#ixntfrihfd .gt_font_normal { #keomoihxmb .gt_font_normal {
font-weight: normal; font-weight: normal;
} }
#ixntfrihfd .gt_font_bold { #keomoihxmb .gt_font_bold {
font-weight: bold; font-weight: bold;
} }
#ixntfrihfd .gt_font_italic { #keomoihxmb .gt_font_italic {
font-style: italic; font-style: italic;
} }
#ixntfrihfd .gt_super { #keomoihxmb .gt_super {
font-size: 65%; font-size: 65%;
} }
#ixntfrihfd .gt_footnote_marks { #keomoihxmb .gt_footnote_marks {
font-size: 75%; font-size: 75%;
vertical-align: 0.4em; vertical-align: 0.4em;
position: initial; position: initial;
} }
#ixntfrihfd .gt_asterisk { #keomoihxmb .gt_asterisk {
font-size: 100%; font-size: 100%;
vertical-align: 0; vertical-align: 0;
} }
#ixntfrihfd .gt_indent_1 { #keomoihxmb .gt_indent_1 {
text-indent: 5px; text-indent: 5px;
} }
#ixntfrihfd .gt_indent_2 { #keomoihxmb .gt_indent_2 {
text-indent: 10px; text-indent: 10px;
} }
#ixntfrihfd .gt_indent_3 { #keomoihxmb .gt_indent_3 {
text-indent: 15px; text-indent: 15px;
} }
#ixntfrihfd .gt_indent_4 { #keomoihxmb .gt_indent_4 {
text-indent: 20px; text-indent: 20px;
} }
#ixntfrihfd .gt_indent_5 { #keomoihxmb .gt_indent_5 {
text-indent: 25px; text-indent: 25px;
} }
</style> </style>
@ -1001,23 +1001,23 @@ demonstration of the functions.</p>
</div> </div>
<div class="sourceCode" id="cb3"><pre class="downlit sourceCode r"> <div class="sourceCode" id="cb3"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">redcapcast_meta</span> <span class="op">|&gt;</span> <span class="fu">gt</span><span class="fu">::</span><span class="fu"><a href="https://gt.rstudio.com/reference/gt.html" class="external-link">gt</a></span><span class="op">(</span><span class="op">)</span></span></code></pre></div> <code class="sourceCode R"><span><span class="va">redcapcast_meta</span> <span class="op">|&gt;</span> <span class="fu">gt</span><span class="fu">::</span><span class="fu"><a href="https://gt.rstudio.com/reference/gt.html" class="external-link">gt</a></span><span class="op">(</span><span class="op">)</span></span></code></pre></div>
<div id="gzbgzhlwxt" style="padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;"> <div id="howggqvkiz" style="padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;">
<style>#gzbgzhlwxt table { <style>#howggqvkiz table {
font-family: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; font-family: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
#gzbgzhlwxt thead, #gzbgzhlwxt tbody, #gzbgzhlwxt tfoot, #gzbgzhlwxt tr, #gzbgzhlwxt td, #gzbgzhlwxt th { #howggqvkiz thead, #howggqvkiz tbody, #howggqvkiz tfoot, #howggqvkiz tr, #howggqvkiz td, #howggqvkiz th {
border-style: none; border-style: none;
} }
#gzbgzhlwxt p { #howggqvkiz p {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
#gzbgzhlwxt .gt_table { #howggqvkiz .gt_table {
display: table; display: table;
border-collapse: collapse; border-collapse: collapse;
line-height: normal; line-height: normal;
@ -1043,12 +1043,12 @@ demonstration of the functions.</p>
border-left-color: #D3D3D3; border-left-color: #D3D3D3;
} }
#gzbgzhlwxt .gt_caption { #howggqvkiz .gt_caption {
padding-top: 4px; padding-top: 4px;
padding-bottom: 4px; padding-bottom: 4px;
} }
#gzbgzhlwxt .gt_title { #howggqvkiz .gt_title {
color: #333333; color: #333333;
font-size: 125%; font-size: 125%;
font-weight: initial; font-weight: initial;
@ -1060,7 +1060,7 @@ demonstration of the functions.</p>
border-bottom-width: 0; border-bottom-width: 0;
} }
#gzbgzhlwxt .gt_subtitle { #howggqvkiz .gt_subtitle {
color: #333333; color: #333333;
font-size: 85%; font-size: 85%;
font-weight: initial; font-weight: initial;
@ -1072,7 +1072,7 @@ demonstration of the functions.</p>
border-top-width: 0; border-top-width: 0;
} }
#gzbgzhlwxt .gt_heading { #howggqvkiz .gt_heading {
background-color: #FFFFFF; background-color: #FFFFFF;
text-align: center; text-align: center;
border-bottom-color: #FFFFFF; border-bottom-color: #FFFFFF;
@ -1084,13 +1084,13 @@ demonstration of the functions.</p>
border-right-color: #D3D3D3; border-right-color: #D3D3D3;
} }
#gzbgzhlwxt .gt_bottom_border { #howggqvkiz .gt_bottom_border {
border-bottom-style: solid; border-bottom-style: solid;
border-bottom-width: 2px; border-bottom-width: 2px;
border-bottom-color: #D3D3D3; border-bottom-color: #D3D3D3;
} }
#gzbgzhlwxt .gt_col_headings { #howggqvkiz .gt_col_headings {
border-top-style: solid; border-top-style: solid;
border-top-width: 2px; border-top-width: 2px;
border-top-color: #D3D3D3; border-top-color: #D3D3D3;
@ -1105,7 +1105,7 @@ demonstration of the functions.</p>
border-right-color: #D3D3D3; border-right-color: #D3D3D3;
} }
#gzbgzhlwxt .gt_col_heading { #howggqvkiz .gt_col_heading {
color: #333333; color: #333333;
background-color: #FFFFFF; background-color: #FFFFFF;
font-size: 100%; font-size: 100%;
@ -1125,7 +1125,7 @@ demonstration of the functions.</p>
overflow-x: hidden; overflow-x: hidden;
} }
#gzbgzhlwxt .gt_column_spanner_outer { #howggqvkiz .gt_column_spanner_outer {
color: #333333; color: #333333;
background-color: #FFFFFF; background-color: #FFFFFF;
font-size: 100%; font-size: 100%;
@ -1137,15 +1137,15 @@ demonstration of the functions.</p>
padding-right: 4px; padding-right: 4px;
} }
#gzbgzhlwxt .gt_column_spanner_outer:first-child { #howggqvkiz .gt_column_spanner_outer:first-child {
padding-left: 0; padding-left: 0;
} }
#gzbgzhlwxt .gt_column_spanner_outer:last-child { #howggqvkiz .gt_column_spanner_outer:last-child {
padding-right: 0; padding-right: 0;
} }
#gzbgzhlwxt .gt_column_spanner { #howggqvkiz .gt_column_spanner {
border-bottom-style: solid; border-bottom-style: solid;
border-bottom-width: 2px; border-bottom-width: 2px;
border-bottom-color: #D3D3D3; border-bottom-color: #D3D3D3;
@ -1157,11 +1157,11 @@ demonstration of the functions.</p>
width: 100%; width: 100%;
} }
#gzbgzhlwxt .gt_spanner_row { #howggqvkiz .gt_spanner_row {
border-bottom-style: hidden; border-bottom-style: hidden;
} }
#gzbgzhlwxt .gt_group_heading { #howggqvkiz .gt_group_heading {
padding-top: 8px; padding-top: 8px;
padding-bottom: 8px; padding-bottom: 8px;
padding-left: 5px; padding-left: 5px;
@ -1187,7 +1187,7 @@ demonstration of the functions.</p>
text-align: left; text-align: left;
} }
#gzbgzhlwxt .gt_empty_group_heading { #howggqvkiz .gt_empty_group_heading {
padding: 0.5px; padding: 0.5px;
color: #333333; color: #333333;
background-color: #FFFFFF; background-color: #FFFFFF;
@ -1202,15 +1202,15 @@ demonstration of the functions.</p>
vertical-align: middle; vertical-align: middle;
} }
#gzbgzhlwxt .gt_from_md > :first-child { #howggqvkiz .gt_from_md > :first-child {
margin-top: 0; margin-top: 0;
} }
#gzbgzhlwxt .gt_from_md > :last-child { #howggqvkiz .gt_from_md > :last-child {
margin-bottom: 0; margin-bottom: 0;
} }
#gzbgzhlwxt .gt_row { #howggqvkiz .gt_row {
padding-top: 8px; padding-top: 8px;
padding-bottom: 8px; padding-bottom: 8px;
padding-left: 5px; padding-left: 5px;
@ -1229,7 +1229,7 @@ demonstration of the functions.</p>
overflow-x: hidden; overflow-x: hidden;
} }
#gzbgzhlwxt .gt_stub { #howggqvkiz .gt_stub {
color: #333333; color: #333333;
background-color: #FFFFFF; background-color: #FFFFFF;
font-size: 100%; font-size: 100%;
@ -1242,7 +1242,7 @@ demonstration of the functions.</p>
padding-right: 5px; padding-right: 5px;
} }
#gzbgzhlwxt .gt_stub_row_group { #howggqvkiz .gt_stub_row_group {
color: #333333; color: #333333;
background-color: #FFFFFF; background-color: #FFFFFF;
font-size: 100%; font-size: 100%;
@ -1256,15 +1256,15 @@ demonstration of the functions.</p>
vertical-align: top; vertical-align: top;
} }
#gzbgzhlwxt .gt_row_group_first td { #howggqvkiz .gt_row_group_first td {
border-top-width: 2px; border-top-width: 2px;
} }
#gzbgzhlwxt .gt_row_group_first th { #howggqvkiz .gt_row_group_first th {
border-top-width: 2px; border-top-width: 2px;
} }
#gzbgzhlwxt .gt_summary_row { #howggqvkiz .gt_summary_row {
color: #333333; color: #333333;
background-color: #FFFFFF; background-color: #FFFFFF;
text-transform: inherit; text-transform: inherit;
@ -1274,16 +1274,16 @@ demonstration of the functions.</p>
padding-right: 5px; padding-right: 5px;
} }
#gzbgzhlwxt .gt_first_summary_row { #howggqvkiz .gt_first_summary_row {
border-top-style: solid; border-top-style: solid;
border-top-color: #D3D3D3; border-top-color: #D3D3D3;
} }
#gzbgzhlwxt .gt_first_summary_row.thick { #howggqvkiz .gt_first_summary_row.thick {
border-top-width: 2px; border-top-width: 2px;
} }
#gzbgzhlwxt .gt_last_summary_row { #howggqvkiz .gt_last_summary_row {
padding-top: 8px; padding-top: 8px;
padding-bottom: 8px; padding-bottom: 8px;
padding-left: 5px; padding-left: 5px;
@ -1293,7 +1293,7 @@ demonstration of the functions.</p>
border-bottom-color: #D3D3D3; border-bottom-color: #D3D3D3;
} }
#gzbgzhlwxt .gt_grand_summary_row { #howggqvkiz .gt_grand_summary_row {
color: #333333; color: #333333;
background-color: #FFFFFF; background-color: #FFFFFF;
text-transform: inherit; text-transform: inherit;
@ -1303,7 +1303,7 @@ demonstration of the functions.</p>
padding-right: 5px; padding-right: 5px;
} }
#gzbgzhlwxt .gt_first_grand_summary_row { #howggqvkiz .gt_first_grand_summary_row {
padding-top: 8px; padding-top: 8px;
padding-bottom: 8px; padding-bottom: 8px;
padding-left: 5px; padding-left: 5px;
@ -1313,7 +1313,7 @@ demonstration of the functions.</p>
border-top-color: #D3D3D3; border-top-color: #D3D3D3;
} }
#gzbgzhlwxt .gt_last_grand_summary_row_top { #howggqvkiz .gt_last_grand_summary_row_top {
padding-top: 8px; padding-top: 8px;
padding-bottom: 8px; padding-bottom: 8px;
padding-left: 5px; padding-left: 5px;
@ -1323,11 +1323,11 @@ demonstration of the functions.</p>
border-bottom-color: #D3D3D3; border-bottom-color: #D3D3D3;
} }
#gzbgzhlwxt .gt_striped { #howggqvkiz .gt_striped {
background-color: rgba(128, 128, 128, 0.05); background-color: rgba(128, 128, 128, 0.05);
} }
#gzbgzhlwxt .gt_table_body { #howggqvkiz .gt_table_body {
border-top-style: solid; border-top-style: solid;
border-top-width: 2px; border-top-width: 2px;
border-top-color: #D3D3D3; border-top-color: #D3D3D3;
@ -1336,7 +1336,7 @@ demonstration of the functions.</p>
border-bottom-color: #D3D3D3; border-bottom-color: #D3D3D3;
} }
#gzbgzhlwxt .gt_footnotes { #howggqvkiz .gt_footnotes {
color: #333333; color: #333333;
background-color: #FFFFFF; background-color: #FFFFFF;
border-bottom-style: none; border-bottom-style: none;
@ -1350,7 +1350,7 @@ demonstration of the functions.</p>
border-right-color: #D3D3D3; border-right-color: #D3D3D3;
} }
#gzbgzhlwxt .gt_footnote { #howggqvkiz .gt_footnote {
margin: 0px; margin: 0px;
font-size: 90%; font-size: 90%;
padding-top: 4px; padding-top: 4px;
@ -1359,7 +1359,7 @@ demonstration of the functions.</p>
padding-right: 5px; padding-right: 5px;
} }
#gzbgzhlwxt .gt_sourcenotes { #howggqvkiz .gt_sourcenotes {
color: #333333; color: #333333;
background-color: #FFFFFF; background-color: #FFFFFF;
border-bottom-style: none; border-bottom-style: none;
@ -1373,7 +1373,7 @@ demonstration of the functions.</p>
border-right-color: #D3D3D3; border-right-color: #D3D3D3;
} }
#gzbgzhlwxt .gt_sourcenote { #howggqvkiz .gt_sourcenote {
font-size: 90%; font-size: 90%;
padding-top: 4px; padding-top: 4px;
padding-bottom: 4px; padding-bottom: 4px;
@ -1381,63 +1381,63 @@ demonstration of the functions.</p>
padding-right: 5px; padding-right: 5px;
} }
#gzbgzhlwxt .gt_left { #howggqvkiz .gt_left {
text-align: left; text-align: left;
} }
#gzbgzhlwxt .gt_center { #howggqvkiz .gt_center {
text-align: center; text-align: center;
} }
#gzbgzhlwxt .gt_right { #howggqvkiz .gt_right {
text-align: right; text-align: right;
font-variant-numeric: tabular-nums; font-variant-numeric: tabular-nums;
} }
#gzbgzhlwxt .gt_font_normal { #howggqvkiz .gt_font_normal {
font-weight: normal; font-weight: normal;
} }
#gzbgzhlwxt .gt_font_bold { #howggqvkiz .gt_font_bold {
font-weight: bold; font-weight: bold;
} }
#gzbgzhlwxt .gt_font_italic { #howggqvkiz .gt_font_italic {
font-style: italic; font-style: italic;
} }
#gzbgzhlwxt .gt_super { #howggqvkiz .gt_super {
font-size: 65%; font-size: 65%;
} }
#gzbgzhlwxt .gt_footnote_marks { #howggqvkiz .gt_footnote_marks {
font-size: 75%; font-size: 75%;
vertical-align: 0.4em; vertical-align: 0.4em;
position: initial; position: initial;
} }
#gzbgzhlwxt .gt_asterisk { #howggqvkiz .gt_asterisk {
font-size: 100%; font-size: 100%;
vertical-align: 0; vertical-align: 0;
} }
#gzbgzhlwxt .gt_indent_1 { #howggqvkiz .gt_indent_1 {
text-indent: 5px; text-indent: 5px;
} }
#gzbgzhlwxt .gt_indent_2 { #howggqvkiz .gt_indent_2 {
text-indent: 10px; text-indent: 10px;
} }
#gzbgzhlwxt .gt_indent_3 { #howggqvkiz .gt_indent_3 {
text-indent: 15px; text-indent: 15px;
} }
#gzbgzhlwxt .gt_indent_4 { #howggqvkiz .gt_indent_4 {
text-indent: 20px; text-indent: 20px;
} }
#gzbgzhlwxt .gt_indent_5 { #howggqvkiz .gt_indent_5 {
text-indent: 25px; text-indent: 25px;
} }
</style> </style>

View File

@ -8,17 +8,16 @@
<meta name="description" content="Forked from REDCapRITS by Paul Egeler and Spectrum Health. <meta name="description" content="Forked from REDCapRITS by Paul Egeler and Spectrum Health.
See &lt;https://github.com/SpectrumHealthResearch/REDCapRITS&gt;. See &lt;https://github.com/SpectrumHealthResearch/REDCapRITS&gt;.
Handles castellated datasets from REDCap projects with repeating instruments. Handles castellated datasets from REDCap projects with repeating instruments.
Assists in casting tidy tables from raw REDCap data exports for each Assists in splitting raw REDCap data exports to base table and child tables
repeated instrument. Keeps a focused data export approach, by allowing to for each repeated instrument. Keeps a focused data export approach, by
only export required data from the database. allowing to only export required data from the database.
REDCap (Research Electronic Data Capture) is a secure, web-based software REDCap (Research Electronic Data Capture) is a secure, web-based software
platform designed to support data capture for research studies, providing platform designed to support data capture for research studies, providing
1) an intuitive interface for validated data capture; 2) audit trails for 1) an intuitive interface for validated data capture; 2) audit trails for
tracking data manipulation and export procedures; 3) automated export tracking data manipulation and export procedures; 3) automated export
procedures for seamless data downloads to common statistical packages; and procedures for seamless data downloads to common statistical packages; and
4) procedures for data integration and interoperability with external sources 4) procedures for data integration and interoperability with external sources
(Harris et al (2009) &lt;doi:10.1016/j.jbi.2008.08.010&gt;; (&lt;doi:10.1016/j.jbi.2008.08.010&gt;; &lt;doi:10.1016/j.jbi.2019.103208&gt;).">
Harris et al (2019) &lt;doi:10.1016/j.jbi.2019.103208&gt;).">
<title>REDCap Castellated Data Handling • REDCapCAST</title> <title>REDCap Castellated Data Handling • REDCapCAST</title>
<!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png"> <!-- 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="icon" type="image/png" sizes="32x32" href="favicon-32x32.png">
@ -34,17 +33,16 @@
<meta property="og:description" content="Forked from REDCapRITS by Paul Egeler and Spectrum Health. <meta property="og:description" content="Forked from REDCapRITS by Paul Egeler and Spectrum Health.
See &lt;https://github.com/SpectrumHealthResearch/REDCapRITS&gt;. See &lt;https://github.com/SpectrumHealthResearch/REDCapRITS&gt;.
Handles castellated datasets from REDCap projects with repeating instruments. Handles castellated datasets from REDCap projects with repeating instruments.
Assists in casting tidy tables from raw REDCap data exports for each Assists in splitting raw REDCap data exports to base table and child tables
repeated instrument. Keeps a focused data export approach, by allowing to for each repeated instrument. Keeps a focused data export approach, by
only export required data from the database. allowing to only export required data from the database.
REDCap (Research Electronic Data Capture) is a secure, web-based software REDCap (Research Electronic Data Capture) is a secure, web-based software
platform designed to support data capture for research studies, providing platform designed to support data capture for research studies, providing
1) an intuitive interface for validated data capture; 2) audit trails for 1) an intuitive interface for validated data capture; 2) audit trails for
tracking data manipulation and export procedures; 3) automated export tracking data manipulation and export procedures; 3) automated export
procedures for seamless data downloads to common statistical packages; and procedures for seamless data downloads to common statistical packages; and
4) procedures for data integration and interoperability with external sources 4) procedures for data integration and interoperability with external sources
(Harris et al (2009) &lt;doi:10.1016/j.jbi.2008.08.010&gt;; (&lt;doi:10.1016/j.jbi.2008.08.010&gt;; &lt;doi:10.1016/j.jbi.2019.103208&gt;).">
Harris et al (2019) &lt;doi:10.1016/j.jbi.2019.103208&gt;).">
<meta property="og:image" content="/logo.png"> <meta property="og:image" content="/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]> <!-- 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/html5shiv/3.7.3/html5shiv.min.js"></script>

View File

@ -3,5 +3,5 @@ pkgdown: 2.0.7
pkgdown_sha: ~ pkgdown_sha: ~
articles: articles:
Introduction: Introduction.html Introduction: Introduction.html
last_built: 2023-06-05T06:39Z last_built: 2023-06-02T12:29Z

View File

@ -156,19 +156,17 @@ instruments only or for all forms.</p></dd>
<span class="r-in"><span></span></span> <span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># You must set the working directory first since the REDCap data export</span></span></span> <span class="r-in"><span><span class="co"># You must set the working directory first since the REDCap data export</span></span></span>
<span class="r-in"><span><span class="co"># script contains relative file references.</span></span></span> <span class="r-in"><span><span class="co"># script contains relative file references.</span></span></span>
<span class="r-in"><span><span class="va">old</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/getwd.html" class="external-link">getwd</a></span><span class="op">(</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/getwd.html" class="external-link">setwd</a></span><span class="op">(</span><span class="st">"/path/to/data/"</span><span class="op">)</span></span></span> <span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/getwd.html" class="external-link">setwd</a></span><span class="op">(</span><span class="st">"/path/to/data/"</span><span class="op">)</span></span></span>
<span class="r-in"><span></span></span> <span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># Run the data export script supplied by REDCap.</span></span></span> <span class="r-in"><span><span class="co"># Run the data export script supplied by REDCap.</span></span></span>
<span class="r-in"><span><span class="co"># This will create a data.frame of your records called 'data'</span></span></span> <span class="r-in"><span><span class="co"># This will create a data.frame of your records called 'data'</span></span></span>
<span class="r-in"><span><span class="kw"><a href="https://rdrr.io/r/base/source.html" class="external-link">source</a></span><span class="op">(</span><span class="st">"ExampleProject_R_2018-06-03_1700.r"</span><span class="op">)</span></span></span> <span class="r-in"><span><span class="kw"><a href="https://rdrr.io/r/base/source.html" class="external-link">source</a></span><span class="op">(</span><span class="st">"ExampleProject_R_2018-06-03_1700.r"</span><span class="op">)</span></span></span>
<span class="r-in"><span></span></span> <span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># Get the metadatan</span></span></span> <span class="r-in"><span><span class="co"># Get the metadata</span></span></span>
<span class="r-in"><span><span class="va">metadata</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/utils/read.table.html" class="external-link">read.csv</a></span><span class="op">(</span><span class="st">"ExampleProject_DataDictionary_2018-06-03.csv"</span><span class="op">)</span></span></span> <span class="r-in"><span><span class="va">metadata</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/utils/read.table.html" class="external-link">read.csv</a></span><span class="op">(</span><span class="st">"ExampleProject_DataDictionary_2018-06-03.csv"</span><span class="op">)</span></span></span>
<span class="r-in"><span></span></span> <span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># Split the tables</span></span></span> <span class="r-in"><span><span class="co"># Split the tables</span></span></span>
<span class="r-in"><span><span class="fu">REDCapRITS</span><span class="fu">::</span><span class="fu">REDCap_split</span><span class="op">(</span><span class="va">data</span>, <span class="va">metadata</span><span class="op">)</span></span></span> <span class="r-in"><span><span class="fu">REDCapRITS</span><span class="fu">::</span><span class="fu">REDCap_split</span><span class="op">(</span><span class="va">data</span>, <span class="va">metadata</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/getwd.html" class="external-link">setwd</a></span><span class="op">(</span><span class="va">old</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="op">}</span></span></span> <span class="r-in"><span><span class="op">}</span></span></span>
</code></pre></div> </code></pre></div>
</div> </div>

File diff suppressed because one or more lines are too long

View File

@ -12,14 +12,12 @@ REDCap
REDCapR REDCapR
REDCapRITS REDCapRITS
SpectrumHealthResearch SpectrumHealthResearch
al
api api
demonstrational demonstrational
descirption descirption
desireable desireable
doi doi
dplyr dplyr
et
immprovements immprovements
jbi jbi
mRS mRS
@ -30,3 +28,44 @@ og
thorugh thorugh
tidyverse tidyverse
uri uri
agdamsbo
Andreas
au
aut
BugReports
clin
covr
cre
Damsbo
dk
doi
dplyr
egeler
Egeler
Gammelgaard
github
Hmisc
https
httr
jbi
jsonlite
keyring
knitr
LazyData
ORCID
paul
RCurl
readr
REDCap,49
redcapcast
REDCapCAST
REDCapR
REDCapRITS
rmarkdown
RoxygenNote
spectrumhealth
SpectrumHealthResearch
testthat
tidyr
tidyselect
VignetteBuilder

View File

@ -84,19 +84,17 @@ REDCapRITS::REDCap_split(records, metadata)
# You must set the working directory first since the REDCap data export # You must set the working directory first since the REDCap data export
# script contains relative file references. # script contains relative file references.
old <- getwd()
setwd("/path/to/data/") setwd("/path/to/data/")
# Run the data export script supplied by REDCap. # Run the data export script supplied by REDCap.
# This will create a data.frame of your records called 'data' # This will create a data.frame of your records called 'data'
source("ExampleProject_R_2018-06-03_1700.r") source("ExampleProject_R_2018-06-03_1700.r")
# Get the metadatan # Get the metadata
metadata <- read.csv("ExampleProject_DataDictionary_2018-06-03.csv") metadata <- read.csv("ExampleProject_DataDictionary_2018-06-03.csv")
# Split the tables # Split the tables
REDCapRITS::REDCap_split(data, metadata) REDCapRITS::REDCap_split(data, metadata)
setwd(old)
} }
} }
\author{ \author{