mirror of
https://github.com/agdamsbo/REDCapCAST.git
synced 2024-11-26 23:01:55 +01:00
Compare commits
2 Commits
56074184f0
...
ffec8f645a
Author | SHA1 | Date | |
---|---|---|---|
|
ffec8f645a | ||
|
0e49189253 |
@ -178,8 +178,8 @@ and launch the app as follows:</p>
|
||||
<span><span class="co">#> $ mrs_complete_inclusion : chr [1:6] "Incomplete" "Incomplete" NA NA ...</span></span>
|
||||
<span><span class="co">#> $ mrs_complete_follow1 : chr [1:6] NA "Incomplete" "Incomplete" NA ...</span></span>
|
||||
<span><span class="co">#> $ mrs_complete_follow2 : chr [1:6] NA NA "Incomplete" NA ...</span></span>
|
||||
<span><span class="co">#> $ con_mrs : logi [1:6] NA NA NA NA NA NA</span></span>
|
||||
<span><span class="co">#> $ con_calc : logi [1:6] NA NA NA NA NA NA</span></span>
|
||||
<span><span class="co">#> $ con_mrs : Factor w/ 2 levels "FALSE","TRUE": NA NA NA NA NA NA</span></span>
|
||||
<span><span class="co">#> $ con_calc : Factor w/ 2 levels "FALSE","TRUE": NA NA NA NA NA NA</span></span>
|
||||
<span><span class="co">#> $ consensus_complete : chr [1:6] NA NA NA NA ...</span></span>
|
||||
<span><span class="co">#> $ event_datetime_1_follow1 : POSIXct[1:6], format: NA "2024-01-18 12:49:42" ...</span></span>
|
||||
<span><span class="co">#> $ event_datetime_1_follow2 : POSIXct[1:6], format: NA NA ...</span></span>
|
||||
@ -223,7 +223,7 @@ and launch the app as follows:</p>
|
||||
<span><span class="co">#> <span style="color: #BCBCBC;"> 8</span> sex data <span style="color: #BB0000;">NA</span> text sex </span></span>
|
||||
<span><span class="co">#> <span style="color: #BCBCBC;"> 9</span> cohabitation data <span style="color: #BB0000;">NA</span> text cohabitation </span></span>
|
||||
<span><span class="co">#> <span style="color: #BCBCBC;">10</span> hypertension data <span style="color: #BB0000;">NA</span> text hypertension </span></span>
|
||||
<span><span class="co">#> <span style="color: #949494;"># ℹ 13 more variables: select_choices_or_calculations <lgl>, field_note <lgl>,</span></span></span>
|
||||
<span><span class="co">#> <span style="color: #949494;"># ℹ 13 more variables: select_choices_or_calculations <chr>, field_note <lgl>,</span></span></span>
|
||||
<span><span class="co">#> <span style="color: #949494;"># text_validation_type_or_show_slider_number <chr>,</span></span></span>
|
||||
<span><span class="co">#> <span style="color: #949494;"># text_validation_min <lgl>, text_validation_max <lgl>, identifier <lgl>,</span></span></span>
|
||||
<span><span class="co">#> <span style="color: #949494;"># branching_logic <lgl>, required_field <lgl>, custom_alignment <lgl>,</span></span></span>
|
||||
|
@ -17,8 +17,8 @@
|
||||
<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="REDCap Castellated Data Handling and Metadata Casting">
|
||||
<meta name="description" content="Originally forked from the R part of REDCapRITS by Paul Egeler. See <https://github.com/pegeler/REDCapRITS>. 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. Also for casting new REDCap databases based on datasets from other sources. 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) <doi:10.1016/j.jbi.2008.08.010>; Harris et al (2019) <doi:10.1016/j.jbi.2019.103208>).">
|
||||
<meta property="og:description" content="Originally forked from the R part of REDCapRITS by Paul Egeler. See <https://github.com/pegeler/REDCapRITS>. 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. Also for casting new REDCap databases based on datasets from other sources. 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) <doi:10.1016/j.jbi.2008.08.010>; Harris et al (2019) <doi:10.1016/j.jbi.2019.103208>).">
|
||||
<meta name="description" content="Casting metadata for REDCap database creation and handling of castellated data using repeated instruments and longitudinal projects in REDCap. Keeps a focused data export approach, by allowing to only export required data from the database. Also for casting new REDCap databases based on datasets from other sources. Originally forked from the R part of REDCapRITS by Paul Egeler. See <https://github.com/pegeler/REDCapRITS>. 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) <doi:10.1016/j.jbi.2008.08.010>; Harris et al (2019) <doi:10.1016/j.jbi.2019.103208>).">
|
||||
<meta property="og:description" content="Casting metadata for REDCap database creation and handling of castellated data using repeated instruments and longitudinal projects in REDCap. Keeps a focused data export approach, by allowing to only export required data from the database. Also for casting new REDCap databases based on datasets from other sources. Originally forked from the R part of REDCapRITS by Paul Egeler. See <https://github.com/pegeler/REDCapRITS>. 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) <doi:10.1016/j.jbi.2008.08.010>; Harris et al (2019) <doi:10.1016/j.jbi.2019.103208>).">
|
||||
<meta property="og:image" content="https://agdamsbo.github.io/REDCapCAST/logo.png">
|
||||
</head>
|
||||
<body>
|
||||
|
@ -40,7 +40,7 @@
|
||||
<div class="section level2">
|
||||
<h2 class="pkg-version" data-toc-text="24.11.2" id="redcapcast-24112">REDCapCAST 24.11.2<a class="anchor" aria-label="anchor" href="#redcapcast-24112"></a></h2>
|
||||
<p>24.11.1 was rejected on CRAN based on wrong title capitalisation. This was an opportunity to extend the package overhaul.</p>
|
||||
<p>Documentation has been updated. Data parser functions have been added (based on readr) and separated from the ds2dd_detailed().</p>
|
||||
<p>Documentation has been updated. Data parser functions have been added (based on readr) and separated from the ds2dd_detailed(). Now also includes conversion of logicals to factor as REDCap truefalse class follows different naming conversion compared to R. Also correct support for variable labels as field labels (use .rds formatted data and label with labelled::var_label())</p>
|
||||
<p>Vignettes and documentation have been restructured.</p>
|
||||
<p>This package has been detached from the REDCapRITS, which it was originally forked from. The data split function will be kept, while testing will be rewritten. This projects has evolved away from the original fork, so I think this detachment is fair.</p>
|
||||
</div>
|
||||
|
@ -5,7 +5,7 @@ articles:
|
||||
Database-creation: Database-creation.html
|
||||
REDCapCAST: REDCapCAST.html
|
||||
Shiny-app: Shiny-app.html
|
||||
last_built: 2024-11-18T16:09Z
|
||||
last_built: 2024-11-19T12:19Z
|
||||
urls:
|
||||
reference: https://agdamsbo.github.io/REDCapCAST/reference
|
||||
article: https://agdamsbo.github.io/REDCapCAST/articles
|
||||
|
@ -1,9 +1,9 @@
|
||||
<!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"><title>REDCapCAST: REDCap Castellated Data Handling and Metadata Casting — REDCapCAST-package • 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><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="REDCapCAST: REDCap Castellated Data Handling and Metadata Casting — REDCapCAST-package"><meta name="description" content="
|
||||
Originally forked from the R part of 'REDCapRITS' by Paul Egeler. See https://github.com/pegeler/REDCapRITS. '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. Also for casting new REDCap databases based on datasets from other sources. '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) doi:10.1016/j.jbi.2008.08.010
|
||||
Casting metadata for REDCap database creation and handling of castellated data using repeated instruments and longitudinal projects in 'REDCap'. Keeps a focused data export approach, by allowing to only export required data from the database. Also for casting new REDCap databases based on datasets from other sources. Originally forked from the R part of 'REDCapRITS' by Paul Egeler. See https://github.com/pegeler/REDCapRITS. '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) doi:10.1016/j.jbi.2008.08.010
|
||||
; Harris et al (2019) doi:10.1016/j.jbi.2019.103208
|
||||
)."><meta property="og:description" content="
|
||||
Originally forked from the R part of 'REDCapRITS' by Paul Egeler. See https://github.com/pegeler/REDCapRITS. '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. Also for casting new REDCap databases based on datasets from other sources. '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) doi:10.1016/j.jbi.2008.08.010
|
||||
Casting metadata for REDCap database creation and handling of castellated data using repeated instruments and longitudinal projects in 'REDCap'. Keeps a focused data export approach, by allowing to only export required data from the database. Also for casting new REDCap databases based on datasets from other sources. Originally forked from the R part of 'REDCapRITS' by Paul Egeler. See https://github.com/pegeler/REDCapRITS. '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) doi:10.1016/j.jbi.2008.08.010
|
||||
; Harris et al (2019) doi:10.1016/j.jbi.2019.103208
|
||||
)."><meta property="og:image" content="https://agdamsbo.github.io/REDCapCAST/logo.png"></head><body>
|
||||
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
|
||||
@ -46,7 +46,7 @@ Originally forked from the R part of 'REDCapRITS' by Paul Egeler. See https://gi
|
||||
|
||||
<div class="ref-description section level2">
|
||||
<p></p>
|
||||
<p>Originally forked from the R part of 'REDCapRITS' by Paul Egeler. See <a href="https://github.com/pegeler/REDCapRITS" class="external-link">https://github.com/pegeler/REDCapRITS</a>. '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. Also for casting new REDCap databases based on datasets from other sources. '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) <a href="https://doi.org/10.1016/j.jbi.2008.08.010" class="external-link">doi:10.1016/j.jbi.2008.08.010</a>
|
||||
<p>Casting metadata for REDCap database creation and handling of castellated data using repeated instruments and longitudinal projects in 'REDCap'. Keeps a focused data export approach, by allowing to only export required data from the database. Also for casting new REDCap databases based on datasets from other sources. Originally forked from the R part of 'REDCapRITS' by Paul Egeler. See <a href="https://github.com/pegeler/REDCapRITS" class="external-link">https://github.com/pegeler/REDCapRITS</a>. '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) <a href="https://doi.org/10.1016/j.jbi.2008.08.010" class="external-link">doi:10.1016/j.jbi.2008.08.010</a>
|
||||
; Harris et al (2019) <a href="https://doi.org/10.1016/j.jbi.2019.103208" class="external-link">doi:10.1016/j.jbi.2019.103208</a>
|
||||
).</p>
|
||||
</div>
|
||||
@ -62,8 +62,7 @@ Originally forked from the R part of 'REDCapRITS' by Paul Egeler. See https://gi
|
||||
<div class="section level2">
|
||||
<h2 id="author">Author<a class="anchor" aria-label="anchor" href="#author"></a></h2>
|
||||
<p><strong>Maintainer</strong>: Andreas Gammelgaard Damsbo <a href="mailto:agdamsbo@clin.au.dk">agdamsbo@clin.au.dk</a> (<a href="https://orcid.org/0000-0002-7559-1154" class="external-link">ORCID</a>)</p>
|
||||
<p>Authors:</p><ul><li><p>Paul Egeler <a href="mailto:paulegeler@gmail.com">paulegeler@gmail.com</a> (<a href="https://orcid.org/0000-0001-6948-9498" class="external-link">ORCID</a>)</p></li>
|
||||
</ul></div>
|
||||
</div>
|
||||
|
||||
</main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2>
|
||||
</nav></aside></div>
|
||||
|
@ -55,7 +55,8 @@
|
||||
<span> field.label <span class="op">=</span> <span class="cn">NULL</span>,</span>
|
||||
<span> field.label.attr <span class="op">=</span> <span class="st">"label"</span>,</span>
|
||||
<span> field.validation <span class="op">=</span> <span class="cn">NULL</span>,</span>
|
||||
<span> metadata <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/names.html" class="external-link">names</a></span><span class="op">(</span><span class="fu">REDCapCAST</span><span class="fu">::</span><span class="va"><a href="redcapcast_meta.html">redcapcast_meta</a></span><span class="op">)</span></span>
|
||||
<span> metadata <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/names.html" class="external-link">names</a></span><span class="op">(</span><span class="fu">REDCapCAST</span><span class="fu">::</span><span class="va"><a href="redcapcast_meta.html">redcapcast_meta</a></span><span class="op">)</span>,</span>
|
||||
<span> convert.logicals <span class="op">=</span> <span class="cn">TRUE</span></span>
|
||||
<span><span class="op">)</span></span></code></pre></div>
|
||||
</div>
|
||||
|
||||
@ -121,6 +122,10 @@ file with `haven::read_dta()`).</p></dd>
|
||||
<dd><p>redcap metadata headings. Default is
|
||||
REDCapCAST:::metadata_names.</p></dd>
|
||||
|
||||
|
||||
<dt id="arg-convert-logicals">convert.logicals<a class="anchor" aria-label="anchor" href="#arg-convert-logicals"></a></dt>
|
||||
<dd><p>convert logicals to factor. Default is TRUE.</p></dd>
|
||||
|
||||
</dl></div>
|
||||
<div class="section level2">
|
||||
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
|
||||
@ -158,7 +163,7 @@ Please, do always inspect the data dictionary before upload.</p>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># dob <date>, age <dbl>, age_integer <dbl>, sex <chr>, cohabitation <chr>,</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># hypertension <chr>, diabetes <chr>, region <chr>,</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># baseline_data_start_complete <chr>, mrs_assessed <chr>, mrs_date <date>,</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># mrs_score <dbl>, mrs_complete <chr>, con_mrs <lgl>, con_calc <lgl>,</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># mrs_score <dbl>, mrs_complete <chr>, con_mrs <fct>, con_calc <fct>,</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># consensus_complete <chr>, event_datetime <dttm>, event_age <dbl>, …</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> $meta</span>
|
||||
@ -176,7 +181,7 @@ Please, do always inspect the data dictionary before upload.</p>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;"> 9</span> age data <span style="color: #BB0000;">NA</span> text age </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;">10</span> age_integer data <span style="color: #BB0000;">NA</span> text age_integer </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># ℹ 17 more rows</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># ℹ 13 more variables: select_choices_or_calculations <lgl>, field_note <lgl>,</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># ℹ 13 more variables: select_choices_or_calculations <chr>, field_note <lgl>,</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># text_validation_type_or_show_slider_number <chr>,</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># text_validation_min <lgl>, text_validation_max <lgl>, identifier <lgl>,</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># branching_logic <lgl>, required_field <lgl>, custom_alignment <lgl>,</span></span>
|
||||
|
204
reference/get_attr.html
Normal file
204
reference/get_attr.html
Normal file
@ -0,0 +1,204 @@
|
||||
<!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"><title>Extract attribute. Returns NA if none — get_attr • 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><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="Extract attribute. Returns NA if none — get_attr"><meta name="description" content="Extract attribute. Returns NA if none"><meta property="og:description" content="Extract attribute. Returns NA if none"><meta property="og:image" content="https://agdamsbo.github.io/REDCapCAST/logo.png"></head><body>
|
||||
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
|
||||
|
||||
|
||||
<nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="light" aria-label="Site navigation"><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.11.2</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="../articles/REDCapCAST.html">Get started</a></li>
|
||||
<li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li>
|
||||
<li class="nav-item dropdown">
|
||||
<button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button>
|
||||
<ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/Database-creation.html">Database-creation</a></li>
|
||||
<li><a class="dropdown-item" href="../articles/Shiny-app.html">Shiny-app</a></li>
|
||||
</ul></li>
|
||||
<li class="nav-item"><a class="nav-link" href="../news/index.html">Changelog</a></li>
|
||||
</ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search">
|
||||
<input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li>
|
||||
<li class="nav-item"><a class="external-link nav-link" href="https://github.com/agdamsbo/REDCapCAST/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li>
|
||||
</ul></div>
|
||||
|
||||
|
||||
</div>
|
||||
</nav><div class="container template-reference-topic">
|
||||
<div class="row">
|
||||
<main id="main" class="col-md-9"><div class="page-header">
|
||||
<img src="../logo.png" class="logo" alt=""><h1>Extract attribute. Returns NA if none</h1>
|
||||
<small class="dont-index">Source: <a href="https://github.com/agdamsbo/REDCapCAST/blob/main/R/ds2dd_detailed.R" class="external-link"><code>R/ds2dd_detailed.R</code></a></small>
|
||||
<div class="d-none name"><code>get_attr.Rd</code></div>
|
||||
</div>
|
||||
|
||||
<div class="ref-description section level2">
|
||||
<p>Extract attribute. Returns NA if none</p>
|
||||
</div>
|
||||
|
||||
<div class="section level2">
|
||||
<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">get_attr</span><span class="op">(</span><span class="va">data</span>, attr <span class="op">=</span> <span class="cn">NULL</span><span class="op">)</span></span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div class="section level2">
|
||||
<h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>
|
||||
|
||||
|
||||
<dl><dt id="arg-data">data<a class="anchor" aria-label="anchor" href="#arg-data"></a></dt>
|
||||
<dd><p>vector</p></dd>
|
||||
|
||||
|
||||
<dt id="arg-attr">attr<a class="anchor" aria-label="anchor" href="#arg-attr"></a></dt>
|
||||
<dd><p>attribute name</p></dd>
|
||||
|
||||
</dl></div>
|
||||
<div class="section level2">
|
||||
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
|
||||
<p>character vector</p>
|
||||
</div>
|
||||
|
||||
<div class="section level2">
|
||||
<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="fu"><a href="https://rdrr.io/r/base/attr.html" class="external-link">attr</a></span><span class="op">(</span><span class="va">mtcars</span><span class="op">$</span><span class="va">mpg</span>, <span class="st">"label"</span><span class="op">)</span> <span class="op"><-</span> <span class="st">"testing"</span></span></span>
|
||||
<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/lapply.html" class="external-link">sapply</a></span><span class="op">(</span><span class="va">mtcars</span>, <span class="va">get_attr</span><span class="op">)</span></span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> $mpg</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> $mpg$label</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> [1] "testing"</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> $cyl</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> NULL</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> $disp</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> NULL</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> $hp</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> NULL</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> $drat</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> NULL</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> $wt</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> NULL</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> $qsec</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> NULL</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> $vs</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> NULL</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> $am</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> NULL</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> $gear</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> NULL</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> $carb</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> NULL</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> </span>
|
||||
<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/lapply.html" class="external-link">lapply</a></span><span class="op">(</span><span class="va">mtcars</span>, \<span class="op">(</span><span class="va">.x</span><span class="op">)</span><span class="fu">get_attr</span><span class="op">(</span><span class="va">.x</span>, <span class="cn">NULL</span><span class="op">)</span><span class="op">)</span></span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> $mpg</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> $mpg$label</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> [1] "testing"</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> $cyl</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> NULL</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> $disp</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> NULL</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> $hp</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> NULL</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> $drat</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> NULL</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> $wt</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> NULL</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> $qsec</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> NULL</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> $vs</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> NULL</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> $am</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> NULL</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> $gear</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> NULL</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> $carb</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> NULL</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> </span>
|
||||
<span class="r-in"><span><span class="va">mtcars</span> <span class="op">|></span></span></span>
|
||||
<span class="r-in"><span> <span class="fu"><a href="numchar2fct.html">numchar2fct</a></span><span class="op">(</span>numeric.threshold <span class="op">=</span> <span class="fl">6</span><span class="op">)</span> <span class="op">|></span></span></span>
|
||||
<span class="r-in"><span> <span class="fu"><a href="ds2dd_detailed.html">ds2dd_detailed</a></span><span class="op">(</span><span class="op">)</span></span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> $data</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># A tibble: 32 × 11</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> mpg cyl disp hp drat wt qsec vs am gear carb </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494; font-style: italic;"><dbl></span> <span style="color: #949494; font-style: italic;"><fct></span> <span style="color: #949494; font-style: italic;"><dbl></span> <span style="color: #949494; font-style: italic;"><dbl></span> <span style="color: #949494; font-style: italic;"><dbl></span> <span style="color: #949494; font-style: italic;"><dbl></span> <span style="color: #949494; font-style: italic;"><dbl></span> <span style="color: #949494; font-style: italic;"><fct></span> <span style="color: #949494; font-style: italic;"><fct></span> <span style="color: #949494; font-style: italic;"><fct></span> <span style="color: #949494; font-style: italic;"><fct></span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;"> 1</span> 21 6 160 110 3.9 2.62 16.5 0 1 4 4 </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;"> 2</span> 21 6 160 110 3.9 2.88 17.0 0 1 4 4 </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;"> 3</span> 22.8 4 108 93 3.85 2.32 18.6 1 1 4 1 </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;"> 4</span> 21.4 6 258 110 3.08 3.22 19.4 1 0 3 1 </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;"> 5</span> 18.7 8 360 175 3.15 3.44 17.0 0 0 3 2 </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;"> 6</span> 18.1 6 225 105 2.76 3.46 20.2 1 0 3 1 </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;"> 7</span> 14.3 8 360 245 3.21 3.57 15.8 0 0 3 4 </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;"> 8</span> 24.4 4 147. 62 3.69 3.19 20 1 0 4 2 </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;"> 9</span> 22.8 4 141. 95 3.92 3.15 22.9 1 0 4 2 </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;">10</span> 19.2 6 168. 123 3.92 3.44 18.3 1 0 4 4 </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># ℹ 22 more rows</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> $meta</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># A tibble: 11 × 18</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> field_name form_name section_header field_type field_label</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494; font-style: italic;"><chr></span> <span style="color: #949494; font-style: italic;"><chr></span> <span style="color: #949494; font-style: italic;"><lgl></span> <span style="color: #949494; font-style: italic;"><chr></span> <span style="color: #949494; font-style: italic;"><chr></span> </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;"> 1</span> mpg data <span style="color: #BB0000;">NA</span> text testing </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;"> 2</span> cyl data <span style="color: #BB0000;">NA</span> radio cyl </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;"> 3</span> disp data <span style="color: #BB0000;">NA</span> text disp </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;"> 4</span> hp data <span style="color: #BB0000;">NA</span> text hp </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;"> 5</span> drat data <span style="color: #BB0000;">NA</span> text drat </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;"> 6</span> wt data <span style="color: #BB0000;">NA</span> text wt </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;"> 7</span> qsec data <span style="color: #BB0000;">NA</span> text qsec </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;"> 8</span> vs data <span style="color: #BB0000;">NA</span> radio vs </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;"> 9</span> am data <span style="color: #BB0000;">NA</span> radio am </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;">10</span> gear data <span style="color: #BB0000;">NA</span> radio gear </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;">11</span> carb data <span style="color: #BB0000;">NA</span> radio carb </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># ℹ 13 more variables: select_choices_or_calculations <chr>, field_note <lgl>,</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># text_validation_type_or_show_slider_number <chr>,</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># text_validation_min <lgl>, text_validation_max <lgl>, identifier <lgl>,</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># branching_logic <lgl>, required_field <lgl>, custom_alignment <lgl>,</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># question_number <lgl>, matrix_group_name <lgl>, matrix_ranking <lgl>,</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># field_annotation <lgl></span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> </span>
|
||||
</code></pre></div>
|
||||
</div>
|
||||
</main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2>
|
||||
</nav></aside></div>
|
||||
|
||||
|
||||
<footer><div class="pkgdown-footer-left">
|
||||
<p>Developed by Andreas Gammelgaard Damsbo, Paul Egeler.</p>
|
||||
</div>
|
||||
|
||||
<div class="pkgdown-footer-right">
|
||||
<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</body></html>
|
||||
|
@ -66,6 +66,16 @@
|
||||
<span class="r-in"><span> labels <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span>Unknown <span class="op">=</span> <span class="fl">9</span>, Refused <span class="op">=</span> <span class="fl">10</span><span class="op">)</span>,</span></span>
|
||||
<span class="r-in"><span> class <span class="op">=</span> <span class="st">"haven_labelled"</span></span></span>
|
||||
<span class="r-in"><span><span class="op">)</span></span></span>
|
||||
<span class="r-in"><span><span class="fu">haven</span><span class="fu">::</span><span class="fu"><a href="https://haven.tidyverse.org/reference/labelled.html" class="external-link">is.labelled</a></span><span class="op">(</span><span class="va">ds</span><span class="op">)</span></span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> [1] TRUE</span>
|
||||
<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/attributes.html" class="external-link">attributes</a></span><span class="op">(</span><span class="va">ds</span><span class="op">)</span></span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> $labels</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> Unknown Refused </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 9 10 </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> $class</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> [1] "haven_labelled"</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> </span>
|
||||
<span class="r-in"><span><span class="va">ds</span> <span class="op">|></span> <span class="fu">haven_all_levels</span><span class="op">(</span><span class="op">)</span></span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 1 2 3 Unknown Refused </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 1 2 3 9 10 </span>
|
||||
|
@ -151,6 +151,12 @@
|
||||
<dd>Retrieve project API key if stored, if not, set and retrieve</dd>
|
||||
</dl><dl><dt>
|
||||
|
||||
<code><a href="get_attr.html">get_attr()</a></code>
|
||||
|
||||
</dt>
|
||||
<dd>Extract attribute. Returns NA if none</dd>
|
||||
</dl><dl><dt>
|
||||
|
||||
<code><a href="get_id_name.html">get_id_name()</a></code>
|
||||
|
||||
</dt>
|
||||
@ -307,6 +313,12 @@
|
||||
<dd>Sanitize list of data frames</dd>
|
||||
</dl><dl><dt>
|
||||
|
||||
<code><a href="set_attr.html">set_attr()</a></code>
|
||||
|
||||
</dt>
|
||||
<dd>Set attributes for named attribute. Appends if attr is NULL</dd>
|
||||
</dl><dl><dt>
|
||||
|
||||
<code><a href="shiny_cast.html">shiny_cast()</a></code>
|
||||
|
||||
</dt>
|
||||
|
90
reference/set_attr.html
Normal file
90
reference/set_attr.html
Normal file
@ -0,0 +1,90 @@
|
||||
<!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"><title>Set attributes for named attribute. Appends if attr is NULL — set_attr • 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><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="Set attributes for named attribute. Appends if attr is NULL — set_attr"><meta name="description" content="Set attributes for named attribute. Appends if attr is NULL"><meta property="og:description" content="Set attributes for named attribute. Appends if attr is NULL"><meta property="og:image" content="https://agdamsbo.github.io/REDCapCAST/logo.png"></head><body>
|
||||
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
|
||||
|
||||
|
||||
<nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="light" aria-label="Site navigation"><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.11.2</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="../articles/REDCapCAST.html">Get started</a></li>
|
||||
<li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li>
|
||||
<li class="nav-item dropdown">
|
||||
<button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button>
|
||||
<ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/Database-creation.html">Database-creation</a></li>
|
||||
<li><a class="dropdown-item" href="../articles/Shiny-app.html">Shiny-app</a></li>
|
||||
</ul></li>
|
||||
<li class="nav-item"><a class="nav-link" href="../news/index.html">Changelog</a></li>
|
||||
</ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search">
|
||||
<input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li>
|
||||
<li class="nav-item"><a class="external-link nav-link" href="https://github.com/agdamsbo/REDCapCAST/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li>
|
||||
</ul></div>
|
||||
|
||||
|
||||
</div>
|
||||
</nav><div class="container template-reference-topic">
|
||||
<div class="row">
|
||||
<main id="main" class="col-md-9"><div class="page-header">
|
||||
<img src="../logo.png" class="logo" alt=""><h1>Set attributes for named attribute. Appends if attr is NULL</h1>
|
||||
<small class="dont-index">Source: <a href="https://github.com/agdamsbo/REDCapCAST/blob/main/R/ds2dd_detailed.R" class="external-link"><code>R/ds2dd_detailed.R</code></a></small>
|
||||
<div class="d-none name"><code>set_attr.Rd</code></div>
|
||||
</div>
|
||||
|
||||
<div class="ref-description section level2">
|
||||
<p>Set attributes for named attribute. Appends if attr is NULL</p>
|
||||
</div>
|
||||
|
||||
<div class="section level2">
|
||||
<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">set_attr</span><span class="op">(</span><span class="va">data</span>, <span class="va">label</span>, attr <span class="op">=</span> <span class="cn">NULL</span><span class="op">)</span></span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div class="section level2">
|
||||
<h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>
|
||||
|
||||
|
||||
<dl><dt id="arg-data">data<a class="anchor" aria-label="anchor" href="#arg-data"></a></dt>
|
||||
<dd><p>vector</p></dd>
|
||||
|
||||
|
||||
<dt id="arg-label">label<a class="anchor" aria-label="anchor" href="#arg-label"></a></dt>
|
||||
<dd><p>label</p></dd>
|
||||
|
||||
|
||||
<dt id="arg-attr">attr<a class="anchor" aria-label="anchor" href="#arg-attr"></a></dt>
|
||||
<dd><p>attribute name</p></dd>
|
||||
|
||||
</dl></div>
|
||||
<div class="section level2">
|
||||
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
|
||||
<p>vector with attribute</p>
|
||||
</div>
|
||||
|
||||
</main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2>
|
||||
</nav></aside></div>
|
||||
|
||||
|
||||
<footer><div class="pkgdown-footer-left">
|
||||
<p>Developed by Andreas Gammelgaard Damsbo, Paul Egeler.</p>
|
||||
</div>
|
||||
|
||||
<div class="pkgdown-footer-right">
|
||||
<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</body></html>
|
||||
|
File diff suppressed because one or more lines are too long
@ -27,6 +27,7 @@
|
||||
<url><loc>https://agdamsbo.github.io/REDCapCAST/reference/focused_metadata.html</loc></url>
|
||||
<url><loc>https://agdamsbo.github.io/REDCapCAST/reference/format_subheader.html</loc></url>
|
||||
<url><loc>https://agdamsbo.github.io/REDCapCAST/reference/get_api_key.html</loc></url>
|
||||
<url><loc>https://agdamsbo.github.io/REDCapCAST/reference/get_attr.html</loc></url>
|
||||
<url><loc>https://agdamsbo.github.io/REDCapCAST/reference/get_id_name.html</loc></url>
|
||||
<url><loc>https://agdamsbo.github.io/REDCapCAST/reference/guess_time_only.html</loc></url>
|
||||
<url><loc>https://agdamsbo.github.io/REDCapCAST/reference/guess_time_only_filter.html</loc></url>
|
||||
@ -54,6 +55,7 @@
|
||||
<url><loc>https://agdamsbo.github.io/REDCapCAST/reference/redcapcast_meta.html</loc></url>
|
||||
<url><loc>https://agdamsbo.github.io/REDCapCAST/reference/replace_curly_quote.html</loc></url>
|
||||
<url><loc>https://agdamsbo.github.io/REDCapCAST/reference/sanitize_split.html</loc></url>
|
||||
<url><loc>https://agdamsbo.github.io/REDCapCAST/reference/set_attr.html</loc></url>
|
||||
<url><loc>https://agdamsbo.github.io/REDCapCAST/reference/shiny_cast.html</loc></url>
|
||||
<url><loc>https://agdamsbo.github.io/REDCapCAST/reference/split_non_repeating_forms.html</loc></url>
|
||||
<url><loc>https://agdamsbo.github.io/REDCapCAST/reference/strsplitx.html</loc></url>
|
||||
|
Loading…
Reference in New Issue
Block a user