Compare commits

...

4 commits

20 changed files with 72 additions and 29 deletions

View file

@ -54,14 +54,14 @@
<h2 id="citation">Citation</h2> <h2 id="citation">Citation</h2>
<p><small class="dont-index">Source: <a href="https://github.com/agdamsbo/REDCapCAST/blob/main/DESCRIPTION" class="external-link"><code>DESCRIPTION</code></a></small></p> <p><small class="dont-index">Source: <a href="https://github.com/agdamsbo/REDCapCAST/blob/main/DESCRIPTION" class="external-link"><code>DESCRIPTION</code></a></small></p>
<p>Damsbo A, Egeler P (2025). <p>Damsbo A, Egeler P (2026).
<em>REDCapCAST: REDCap Metadata Casting and Castellated Data Handling</em>. <em>REDCapCAST: REDCap Metadata Casting and Castellated Data Handling</em>.
R package version 25.11.1, <a href="https://github.com/agdamsbo/REDCapCAST" class="external-link">https://github.com/agdamsbo/REDCapCAST</a>. R package version 25.11.1, <a href="https://github.com/agdamsbo/REDCapCAST" class="external-link">https://github.com/agdamsbo/REDCapCAST</a>.
</p> </p>
<pre>@Manual{, <pre>@Manual{,
title = {REDCapCAST: REDCap Metadata Casting and Castellated Data Handling}, title = {REDCapCAST: REDCap Metadata Casting and Castellated Data Handling},
author = {Andreas Gammelgaard Damsbo and Paul Egeler}, author = {Andreas Gammelgaard Damsbo and Paul Egeler},
year = {2025}, year = {2026},
note = {R package version 25.11.1}, note = {R package version 25.11.1},
url = {https://github.com/agdamsbo/REDCapCAST}, url = {https://github.com/agdamsbo/REDCapCAST},
}</pre> }</pre>

View file

@ -12,14 +12,14 @@
Source: Source:
[`DESCRIPTION`](https://github.com/agdamsbo/REDCapCAST/blob/main/DESCRIPTION) [`DESCRIPTION`](https://github.com/agdamsbo/REDCapCAST/blob/main/DESCRIPTION)
Damsbo A, Egeler P (2025). *REDCapCAST: REDCap Metadata Casting and Damsbo A, Egeler P (2026). *REDCapCAST: REDCap Metadata Casting and
Castellated Data Handling*. R package version 25.11.1, Castellated Data Handling*. R package version 25.11.1,
<https://github.com/agdamsbo/REDCapCAST>. <https://github.com/agdamsbo/REDCapCAST>.
@Manual{, @Manual{,
title = {REDCapCAST: REDCap Metadata Casting and Castellated Data Handling}, title = {REDCapCAST: REDCap Metadata Casting and Castellated Data Handling},
author = {Andreas Gammelgaard Damsbo and Paul Egeler}, author = {Andreas Gammelgaard Damsbo and Paul Egeler},
year = {2025}, year = {2026},
note = {R package version 25.11.1}, note = {R package version 25.11.1},
url = {https://github.com/agdamsbo/REDCapCAST}, url = {https://github.com/agdamsbo/REDCapCAST},
} }

File diff suppressed because one or more lines are too long

View file

@ -119,7 +119,7 @@ contributing to this project, you agree to abide by its terms.
- [`create_html_table()`](https://agdamsbo.github.io/REDCapCAST/reference/create_html_table.md) - [`create_html_table()`](https://agdamsbo.github.io/REDCapCAST/reference/create_html_table.md)
: Create two-column HTML table for data piping in REDCap instruments : Create two-column HTML table for data piping in REDCap instruments
- [`create_instrument_meta()`](https://agdamsbo.github.io/REDCapCAST/reference/create_instrument_meta.md) - [`create_instrument_meta()`](https://agdamsbo.github.io/REDCapCAST/reference/create_instrument_meta.md)
: DEPRICATED Create zips file with necessary content based on data set : DEPRECATED Create zips file with necessary content based on data set
- [`cut_string_length()`](https://agdamsbo.github.io/REDCapCAST/reference/cut_string_length.md) - [`cut_string_length()`](https://agdamsbo.github.io/REDCapCAST/reference/cut_string_length.md)
: Cut string to desired length : Cut string to desired length
- [`d2w()`](https://agdamsbo.github.io/REDCapCAST/reference/d2w.md) : - [`d2w()`](https://agdamsbo.github.io/REDCapCAST/reference/d2w.md) :

View file

@ -38,10 +38,18 @@
<small>Source: <a href="https://github.com/agdamsbo/REDCapCAST/blob/main/NEWS.md" class="external-link"><code>NEWS.md</code></a></small> <small>Source: <a href="https://github.com/agdamsbo/REDCapCAST/blob/main/NEWS.md" class="external-link"><code>NEWS.md</code></a></small>
</div> </div>
<div class="section level2">
<h2 class="pkg-version" data-toc-text="26.1.1" id="redcapcast-2611">REDCapCAST 26.1.1<a class="anchor" aria-label="anchor" href="#redcapcast-2611"></a></h2>
<p>25.11.1 was never pushed to CRAN, so this fills in for that.</p>
<ul><li><p>FIX: spelling</p></li>
<li><p>FIX: Suggested dependencies were trimmed including {styler}.</p></li>
<li><p>FIX: export_redcap_instrument was updated to include default file name for the instrument zip. Ensures custom names has correct file extension.</p></li>
</ul></div>
<div class="section level2"> <div class="section level2">
<h2 class="pkg-version" data-toc-text="25.11.1" id="redcapcast-25111">REDCapCAST 25.11.1<a class="anchor" aria-label="anchor" href="#redcapcast-25111"></a></h2> <h2 class="pkg-version" data-toc-text="25.11.1" id="redcapcast-25111">REDCapCAST 25.11.1<a class="anchor" aria-label="anchor" href="#redcapcast-25111"></a></h2>
<ul><li><p>FIX: logiccals exported as numeric for data upload</p></li> <ul><li><p>FIX: logicals exported as numeric for data upload</p></li>
<li><p>FIX: improved name cleaning</p></li> <li><p>FIX: improved name cleaning</p></li>
<li><p>FIX: use the more robust readr::write_csv() to export data.</p></li>
</ul></div> </ul></div>
<div class="section level2"> <div class="section level2">
<h2 class="pkg-version" data-toc-text="25.3.2" id="redcapcast-2532">REDCapCAST 25.3.2<a class="anchor" aria-label="anchor" href="#redcapcast-2532"></a></h2><p class="text-muted">CRAN release: 2025-03-10</p> <h2 class="pkg-version" data-toc-text="25.3.2" id="redcapcast-2532">REDCapCAST 25.3.2<a class="anchor" aria-label="anchor" href="#redcapcast-2532"></a></h2><p class="text-muted">CRAN release: 2025-03-10</p>

View file

@ -1,11 +1,25 @@
# Changelog # Changelog
## REDCapCAST 26.1.1
25.11.1 was never pushed to CRAN, so this fills in for that.
- FIX: spelling
- FIX: Suggested dependencies were trimmed including {styler}.
- FIX: export_redcap_instrument was updated to include default file name
for the instrument zip. Ensures custom names has correct file
extension.
## REDCapCAST 25.11.1 ## REDCapCAST 25.11.1
- FIX: logiccals exported as numeric for data upload - FIX: logicals exported as numeric for data upload
- FIX: improved name cleaning - FIX: improved name cleaning
- FIX: use the more robust readr::write_csv() to export data.
## REDCapCAST 25.3.2 ## REDCapCAST 25.3.2
CRAN release: 2025-03-10 CRAN release: 2025-03-10

View file

@ -5,7 +5,7 @@ articles:
Database-creation: Database-creation.html Database-creation: Database-creation.html
REDCapCAST: REDCapCAST.html REDCapCAST: REDCapCAST.html
Shiny-app: Shiny-app.html Shiny-app: Shiny-app.html
last_built: 2025-11-14T14:10Z last_built: 2026-01-28T21:50Z
urls: urls:
reference: https://agdamsbo.github.io/REDCapCAST/reference reference: https://agdamsbo.github.io/REDCapCAST/reference
article: https://agdamsbo.github.io/REDCapCAST/articles article: https://agdamsbo.github.io/REDCapCAST/articles

View file

@ -71,6 +71,8 @@ Trying to make up for different naming conventions.</p>
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="st">"Research!, ne:ws? and c;l-.ls"</span> <span class="op">|&gt;</span> <span class="fu">clean_redcap_name</span><span class="op">(</span><span class="op">)</span></span></span> <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="st">"Research!, ne:ws? and c;l-.ls"</span> <span class="op">|&gt;</span> <span class="fu">clean_redcap_name</span><span class="op">(</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "research_news_and_clls"</span> <span class="r-out co"><span class="r-pr">#&gt;</span> [1] "research_news_and_clls"</span>
<span class="r-in"><span><span class="st">"8_new_TEST_"</span> <span class="op">|&gt;</span> <span class="fu">clean_redcap_name</span><span class="op">(</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "8_new_test"</span>
</code></pre></div> </code></pre></div>
</div> </div>
</main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2>

View file

@ -25,4 +25,6 @@ vector or data frame, same format as input
``` r ``` r
"Research!, ne:ws? and c;l-.ls" |> clean_redcap_name() "Research!, ne:ws? and c;l-.ls" |> clean_redcap_name()
#> [1] "research_news_and_clls" #> [1] "research_news_and_clls"
"8_new_TEST_" |> clean_redcap_name()
#> [1] "8_new_test"
``` ```

View file

@ -1,8 +1,10 @@
<!DOCTYPE html> <!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en-US"><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"><title>DEPRICATED Create zips file with necessary content based on data set — create_instrument_meta • REDCapCAST</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><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><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="DEPRICATED Create zips file with necessary content based on data set — create_instrument_meta"><meta name="description" content="Metadata can be added by editing the data dictionary of a project in the <!-- Generated by pkgdown: do not edit by hand --><html lang="en-US"><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"><title>DEPRECATED Create zips file with necessary content based on data set — create_instrument_meta • REDCapCAST</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><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><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="DEPRECATED Create zips file with necessary content based on data set — create_instrument_meta"><meta name="description" content="Use export_redcap_instrument()
Metadata can be added by editing the data dictionary of a project in the
initial design phase. If you want to later add new instruments, this initial design phase. If you want to later add new instruments, this
function can be used to create (an) instrument(s) to add to a project in function can be used to create (an) instrument(s) to add to a project in
production."><meta property="og:description" content="Metadata can be added by editing the data dictionary of a project in the production."><meta property="og:description" content="Use export_redcap_instrument()
Metadata can be added by editing the data dictionary of a project in the
initial design phase. If you want to later add new instruments, this initial design phase. If you want to later add new instruments, this
function can be used to create (an) instrument(s) to add to a project in function can be used to create (an) instrument(s) to add to a project in
production."></head><body> production."></head><body>
@ -40,13 +42,14 @@ production."></head><body>
<div class="row"> <div class="row">
<main id="main" class="col-md-9"><div class="page-header"> <main id="main" class="col-md-9"><div class="page-header">
<h1>DEPRICATED Create zips file with necessary content based on data set</h1> <h1>DEPRECATED Create zips file with necessary content based on data set</h1>
<small class="dont-index">Source: <a href="https://github.com/agdamsbo/REDCapCAST/blob/main/R/export_redcap_instrument.R" class="external-link"><code>R/export_redcap_instrument.R</code></a></small> <small class="dont-index">Source: <a href="https://github.com/agdamsbo/REDCapCAST/blob/main/R/export_redcap_instrument.R" class="external-link"><code>R/export_redcap_instrument.R</code></a></small>
<div class="d-none name"><code>create_instrument_meta.Rd</code></div> <div class="d-none name"><code>create_instrument_meta.Rd</code></div>
</div> </div>
<div class="ref-description section level2"> <div class="ref-description section level2">
<p>Metadata can be added by editing the data dictionary of a project in the <p>Use export_redcap_instrument()
Metadata can be added by editing the data dictionary of a project in the
initial design phase. If you want to later add new instruments, this initial design phase. If you want to later add new instruments, this
function can be used to create (an) instrument(s) to add to a project in function can be used to create (an) instrument(s) to add to a project in
production.</p> production.</p>

View file

@ -1,9 +1,9 @@
# DEPRICATED Create zips file with necessary content based on data set # DEPRECATED Create zips file with necessary content based on data set
Metadata can be added by editing the data dictionary of a project in the Use export_redcap_instrument() Metadata can be added by editing the data
initial design phase. If you want to later add new instruments, this dictionary of a project in the initial design phase. If you want to
function can be used to create (an) instrument(s) to add to a project in later add new instruments, this function can be used to create (an)
production. instrument(s) to add to a project in production.
## Usage ## Usage

View file

@ -54,7 +54,12 @@ production.</p>
<div class="section level2"> <div class="section level2">
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">export_redcap_instrument</span><span class="op">(</span><span class="va">data</span>, <span class="va">file</span>, force <span class="op">=</span> <span class="cn">FALSE</span>, record.id <span class="op">=</span> <span class="st">"record_id"</span><span class="op">)</span></span></code></pre></div> <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">export_redcap_instrument</span><span class="op">(</span></span>
<span> <span class="va">data</span>,</span>
<span> file <span class="op">=</span> <span class="fu">here</span><span class="fu">::</span><span class="fu"><a href="https://here.r-lib.org/reference/here.html" class="external-link">here</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/paste.html" class="external-link">paste0</a></span><span class="op">(</span><span class="st">"instrument_"</span>, <span class="fu"><a href="https://rdrr.io/r/base/Sys.time.html" class="external-link">Sys.Date</a></span><span class="op">(</span><span class="op">)</span>, <span class="st">".zip"</span><span class="op">)</span><span class="op">)</span>,</span>
<span> force <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> record.id <span class="op">=</span> <span class="st">"record_id"</span></span>
<span><span class="op">)</span></span></code></pre></div>
</div> </div>
<div class="section level2"> <div class="section level2">

View file

@ -8,7 +8,12 @@ production.
## Usage ## Usage
``` r ``` r
export_redcap_instrument(data, file, force = FALSE, record.id = "record_id") export_redcap_instrument(
data,
file = here::here(paste0("instrument_", Sys.Date(), ".zip")),
force = FALSE,
record.id = "record_id"
)
``` ```
## Arguments ## Arguments

View file

@ -157,7 +157,7 @@
<code><a href="create_instrument_meta.html">create_instrument_meta()</a></code> <code><a href="create_instrument_meta.html">create_instrument_meta()</a></code>
</dt> </dt>
<dd>DEPRICATED Create zips file with necessary content based on data set</dd> <dd>DEPRECATED Create zips file with necessary content based on data set</dd>
<dt> <dt>

View file

@ -36,7 +36,7 @@
- [`create_html_table()`](https://agdamsbo.github.io/REDCapCAST/reference/create_html_table.md) - [`create_html_table()`](https://agdamsbo.github.io/REDCapCAST/reference/create_html_table.md)
: Create two-column HTML table for data piping in REDCap instruments : Create two-column HTML table for data piping in REDCap instruments
- [`create_instrument_meta()`](https://agdamsbo.github.io/REDCapCAST/reference/create_instrument_meta.md) - [`create_instrument_meta()`](https://agdamsbo.github.io/REDCapCAST/reference/create_instrument_meta.md)
: DEPRICATED Create zips file with necessary content based on data set : DEPRECATED Create zips file with necessary content based on data set
- [`cut_string_length()`](https://agdamsbo.github.io/REDCapCAST/reference/cut_string_length.md) - [`cut_string_length()`](https://agdamsbo.github.io/REDCapCAST/reference/cut_string_length.md)
: Cut string to desired length : Cut string to desired length
- [`d2w()`](https://agdamsbo.github.io/REDCapCAST/reference/d2w.md) : - [`d2w()`](https://agdamsbo.github.io/REDCapCAST/reference/d2w.md) :

View file

@ -82,8 +82,10 @@ easing the split around the defined delimiter, see example.</p>
<div class="section level2"> <div class="section level2">
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="va">test</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"12 months follow-up"</span>, <span class="st">"3 steps"</span>, <span class="st">"mRS 6 weeks"</span>,</span></span> <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="va">test</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span></span></span>
<span class="r-in"><span><span class="st">"Counting to 231 now"</span><span class="op">)</span></span></span> <span class="r-in"><span> <span class="st">"12 months follow-up"</span>, <span class="st">"3 steps"</span>, <span class="st">"mRS 6 weeks"</span>,</span></span>
<span class="r-in"><span> <span class="st">"Counting to 231 now"</span></span></span>
<span class="r-in"><span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="fu">strsplitx</span><span class="op">(</span><span class="va">test</span>, <span class="st">"[0-9]"</span>, type <span class="op">=</span> <span class="st">"around"</span><span class="op">)</span></span></span> <span class="r-in"><span><span class="fu">strsplitx</span><span class="op">(</span><span class="va">test</span>, <span class="st">"[0-9]"</span>, type <span class="op">=</span> <span class="st">"around"</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [[1]]</span> <span class="r-out co"><span class="r-pr">#&gt;</span> [[1]]</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "1" "2" " months follow-up"</span> <span class="r-out co"><span class="r-pr">#&gt;</span> [1] "1" "2" " months follow-up"</span>

View file

@ -38,8 +38,10 @@ list
## Examples ## Examples
``` r ``` r
test <- c("12 months follow-up", "3 steps", "mRS 6 weeks", test <- c(
"Counting to 231 now") "12 months follow-up", "3 steps", "mRS 6 weeks",
"Counting to 231 now"
)
strsplitx(test, "[0-9]", type = "around") strsplitx(test, "[0-9]", type = "around")
#> [[1]] #> [[1]]
#> [1] "1" "2" " months follow-up" #> [1] "1" "2" " months follow-up"

File diff suppressed because one or more lines are too long