From cedf90e1dba744abf57e9d67a9596a127aa0cf86 Mon Sep 17 00:00:00 2001 From: agdamsbo <43278243+agdamsbo@users.noreply.github.com> Date: Wed, 27 Nov 2024 09:07:15 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20agdamsbo?= =?UTF-8?q?/REDCapCAST@80328d6e9a1165c66eec2bc5b4bc8b7d8532ed31=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- articles/Shiny-app.html | 4 +- news/index.html | 4 +- pkgdown.yml | 2 +- reference/apply_factor_labels.html | 86 +++++++++++++++++ reference/apply_field_label.html | 86 +++++++++++++++++ reference/as_factor.data.frame.html | 8 ++ reference/as_factor.html | 17 +++- reference/as_factor.redcapcast_labelled.html | 8 ++ reference/clean_field_label.html | 2 +- reference/ds2dd.html | 4 +- reference/ds2dd_detailed.html | 4 +- reference/fct_drop.data.frame.html | 8 ++ reference/fct_drop.html | 85 +++++++++++++++++ reference/index.html | 36 ++++--- reference/is.labelled.html | 98 ++++++++++++++++++++ reference/read_redcap_tables.html | 8 +- search.json | 2 +- sitemap.xml | 6 +- 18 files changed, 442 insertions(+), 26 deletions(-) create mode 100644 reference/apply_factor_labels.html create mode 100644 reference/apply_field_label.html create mode 100644 reference/as_factor.data.frame.html create mode 100644 reference/as_factor.redcapcast_labelled.html create mode 100644 reference/fct_drop.data.frame.html create mode 100644 reference/fct_drop.html create mode 100644 reference/is.labelled.html diff --git a/articles/Shiny-app.html b/articles/Shiny-app.html index 1e5b738..7436f47 100644 --- a/articles/Shiny-app.html +++ b/articles/Shiny-app.html @@ -149,7 +149,7 @@ and launch the app as follows:

#> $ new_event_complete_3_follow2: chr NA NA "Incomplete" "Complete" ...
 ds|> 
-  ds2dd_detailed()|>  
+  ds2dd_detailed(metadata = names(REDCapCAST::redcapcast_meta))|>  
   purrr::pluck("data") |> 
   str()
 #> tibble [6 × 52] (S3: tbl_df/tbl/data.frame)
@@ -207,7 +207,7 @@ and launch the app as follows:

#> $ new_event_complete_3_follow2: chr [1:6] NA NA "Incomplete" "Complete" ...
 ds|> 
-  ds2dd_detailed()|>  
+  ds2dd_detailed(metadata = names(REDCapCAST::redcapcast_meta))|>  
   purrr::pluck("meta") |> 
   head(10)
 #> # A tibble: 10 × 18
diff --git a/news/index.html b/news/index.html
index bdeea4c..1aef1fe 100644
--- a/news/index.html
+++ b/news/index.html
@@ -40,7 +40,9 @@
     

REDCapCAST 24.11.4

The hosting on shinyapps.io has given a lot of trouble recently. Modyfied package structure a little around the shiny_cast(), to accommodate an alternative hosting approach with all package functions included in a script instead of requiring the package.

-
  • read_readcap_labelled():
  • +
    • NEW: A new option to raw_or_label in read_readcap_tables() has been added: “both”. Get raw values with REDCap labels applied as labels. Use as_factor() to format factors with original labels and use the gtsummary package to easily get beautiful tables with original labels from REDCap. Use fct_drop() to drop empty levels.

    • +
    • NEW: fct_drop() has been added with an extension to forcats::fct_drop(), that works across data.frames. Use as fct_drop().

    • +
    • CHANGE: the default data export method of easy_redcap() has been changed to use the new labelled data export with read_readcap_tables().

REDCapCAST 24.11.3

diff --git a/pkgdown.yml b/pkgdown.yml index 5e37756..8bb5d3b 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -5,7 +5,7 @@ articles: Database-creation: Database-creation.html REDCapCAST: REDCapCAST.html Shiny-app: Shiny-app.html -last_built: 2024-11-27T07:02Z +last_built: 2024-11-27T09:06Z urls: reference: https://agdamsbo.github.io/REDCapCAST/reference article: https://agdamsbo.github.io/REDCapCAST/articles diff --git a/reference/apply_factor_labels.html b/reference/apply_factor_labels.html new file mode 100644 index 0000000..27c2a0e --- /dev/null +++ b/reference/apply_factor_labels.html @@ -0,0 +1,86 @@ + +Preserve all factor levels from REDCap data dictionary in data export — apply_factor_labels • REDCapCAST + Skip to contents + + +
+
+
+ +
+

Preserve all factor levels from REDCap data dictionary in data export

+
+ +
+

Usage

+
apply_factor_labels(data, meta)
+
+ +
+

Arguments

+ + +
data
+

REDCap exported data set

+ + +
meta
+

REDCap data dictionary

+ +
+
+

Value

+

data.frame

+
+ +
+ + +
+ + + +
+ + + + + + + diff --git a/reference/apply_field_label.html b/reference/apply_field_label.html new file mode 100644 index 0000000..1ee229d --- /dev/null +++ b/reference/apply_field_label.html @@ -0,0 +1,86 @@ + +Apply REDCap filed labels to data frame — apply_field_label • REDCapCAST + Skip to contents + + +
+
+
+ +
+

Apply REDCap filed labels to data frame

+
+ +
+

Usage

+
apply_field_label(data, meta)
+
+ +
+

Arguments

+ + +
data
+

REDCap exported data set

+ + +
meta
+

REDCap data dictionary

+ +
+
+

Value

+

data.frame

+
+ +
+ + +
+ + + +
+ + + + + + + diff --git a/reference/as_factor.data.frame.html b/reference/as_factor.data.frame.html new file mode 100644 index 0000000..9a11615 --- /dev/null +++ b/reference/as_factor.data.frame.html @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/reference/as_factor.html b/reference/as_factor.html index 08b3cb8..d9b3502 100644 --- a/reference/as_factor.html +++ b/reference/as_factor.html @@ -78,7 +78,18 @@ ta loss in case of rich formatted and labelled data.

levels = c("default", "labels", "values", "both"), ordered = FALSE, ... -)
+) + +# S3 method for class 'redcapcast_labelled' +as_factor( + x, + levels = c("default", "labels", "values", "both"), + ordered = FALSE, + ... +) + +# S3 method for class 'data.frame' +as_factor(x, ..., only_labelled = TRUE)
@@ -106,6 +117,10 @@ ta loss in case of rich formatted and labelled data.

If `TRUE` create an ordered (ordinal) factor, if `FALSE` (the default) create a regular (nominal) factor.

+ +
only_labelled
+

Only apply to labelled columns?

+

Details

diff --git a/reference/as_factor.redcapcast_labelled.html b/reference/as_factor.redcapcast_labelled.html new file mode 100644 index 0000000..9a11615 --- /dev/null +++ b/reference/as_factor.redcapcast_labelled.html @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/reference/clean_field_label.html b/reference/clean_field_label.html index e082fb7..6c8784e 100644 --- a/reference/clean_field_label.html +++ b/reference/clean_field_label.html @@ -36,7 +36,7 @@ and save the first paragraph ('&lt;p&gt;...&lt;/p&gt;').">
diff --git a/reference/ds2dd.html b/reference/ds2dd.html index b6cbeba..cfc864e 100644 --- a/reference/ds2dd.html +++ b/reference/ds2dd.html @@ -54,7 +54,7 @@ for a more advanced function.

field.type = "text", field.label = NULL, include.column.names = FALSE, - metadata = REDCapCAST::redcap_meta_default() + metadata = names(REDCapCAST::redcapcast_meta) )
@@ -94,7 +94,7 @@ column names for original data set for upload.

metadata

Metadata column names. Default is the included -REDCapCAST::redcap_meta_default.

+names(REDCapCAST::redcapcast_meta).

diff --git a/reference/ds2dd_detailed.html b/reference/ds2dd_detailed.html index 5fafe69..9538842 100644 --- a/reference/ds2dd_detailed.html +++ b/reference/ds2dd_detailed.html @@ -55,7 +55,7 @@ field.label = NULL, field.label.attr = "label", field.validation = NULL, - metadata = REDCapCAST::redcap_meta_default(), + metadata = names(REDCapCAST::redcapcast_meta), convert.logicals = TRUE )
@@ -120,7 +120,7 @@ file with `haven::read_dta()`).

metadata

redcap metadata headings. Default is -REDCapCAST::redcap_meta_default().

+names(REDCapCAST::redcapcast_meta).

convert.logicals
diff --git a/reference/fct_drop.data.frame.html b/reference/fct_drop.data.frame.html new file mode 100644 index 0000000..ea9a7c8 --- /dev/null +++ b/reference/fct_drop.data.frame.html @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/reference/fct_drop.html b/reference/fct_drop.html new file mode 100644 index 0000000..6fc6a51 --- /dev/null +++ b/reference/fct_drop.html @@ -0,0 +1,85 @@ + +Drop unused levels preserving label data — fct_drop • REDCapCAST + Skip to contents + + +
+
+
+ +
+

This extends [forcats::fct_drop()] to natively work across a data.frame and +replace [base::droplevels()].

+
+ +
+

Usage

+
fct_drop.data.frame(x, ...)
+
+ +
+

Arguments

+ + +
x
+

Factor to drop unused levels

+ + +
...
+

Other arguments passed down to method.

+ +
+ +
+ + +
+ + + + + + + diff --git a/reference/index.html b/reference/index.html index 0791aae..c0da40b 100644 --- a/reference/index.html +++ b/reference/index.html @@ -61,6 +61,18 @@
Check if vector is all NA
+ apply_factor_labels() + +
+
Preserve all factor levels from REDCap data dictionary in data export
+
+ + apply_field_label() + +
+
Apply REDCap filed labels to data frame
+
+ as_factor()
@@ -169,6 +181,12 @@
Allows conversion of factor to numeric values preserving original levels
+ fct_drop.data.frame() + +
+
Drop unused levels preserving label data
+
+ file_extension()
@@ -235,6 +253,12 @@
Simple html tag wrapping for REDCap text formatting
+ is.labelled() + +
+
Tests for multiple label classes
+
+ is_missing()
@@ -337,24 +361,12 @@
Convenience function to download complete instrument, using token storage in keyring.
- read_redcap_labelled() - -
-
REDCap read function to preserve field labels and all factor levels
-
- read_redcap_tables()
Download REDCap data
- redcap_meta_default() - -
-
Default column names of a REDCap data dictionary
-
- redcap_wider()
diff --git a/reference/is.labelled.html b/reference/is.labelled.html new file mode 100644 index 0000000..c463c41 --- /dev/null +++ b/reference/is.labelled.html @@ -0,0 +1,98 @@ + +Tests for multiple label classes — is.labelled • REDCapCAST + Skip to contents + + +
+
+
+ +
+

Tests for multiple label classes

+
+ +
+

Usage

+
is.labelled(
+  x,
+  classes = c("redcapcast_labelled", "haven_labelled", "labelled")
+)
+
+ +
+

Arguments

+ + +
x
+

data

+ + +
classes
+

classes to test

+ +
+
+

Value

+

logical

+
+ +
+

Examples

+
structure(c(1, 2, 3, 2, 10, 9),
+  labels = c(Unknown = 9, Refused = 10),
+  class = "haven_labelled"
+) |> is.labelled()
+#> [1] TRUE
+
+
+
+ + +
+ + + +
+ + + + + + + diff --git a/reference/read_redcap_tables.html b/reference/read_redcap_tables.html index 4ab4eb4..c1902f8 100644 --- a/reference/read_redcap_tables.html +++ b/reference/read_redcap_tables.html @@ -97,7 +97,13 @@ instruments.

raw_or_label
-

raw or label tags

+

raw or label tags. Can be

+

* "raw": Standard [REDCapR] method to get raw values. + * "label": Standard [REDCapR] method to get label values. + * "both": Get raw values with REDCap labels applied as labels. Use + [as_factor()] to format factors with original labels and use the + [gtsummary] package to easily get beautiful tables with original labels + from REDCap. Use [fct_drop()] to drop empty levels.

split_forms
diff --git a/search.json b/search.json index 81d8e92..c72d25e 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":[]},{"path":"https://agdamsbo.github.io/REDCapCAST/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement andreas@gdamsbo.dk. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired Mozilla’s code conduct enforcement ladder. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"GNU General Public License","title":"GNU General Public License","text":"Version 3, 29 June 2007Copyright © 2007 Free Software Foundation, Inc.  Everyone permitted copy distribute verbatim copies license document, changing allowed.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/LICENSE.html","id":"preamble","dir":"","previous_headings":"","what":"Preamble","title":"GNU General Public License","text":"GNU General Public License free, copyleft license software kinds works. licenses software practical works designed take away freedom share change works. contrast, GNU General Public License intended guarantee freedom share change versions program–make sure remains free software users. , Free Software Foundation, use GNU General Public License software; applies also work released way authors. can apply programs, . speak free software, referring freedom, price. General Public Licenses designed make sure freedom distribute copies free software (charge wish), receive source code can get want , can change software use pieces new free programs, know can things. protect rights, need prevent others denying rights asking surrender rights. Therefore, certain responsibilities distribute copies software, modify : responsibilities respect freedom others. example, distribute copies program, whether gratis fee, must pass recipients freedoms received. must make sure , , receive can get source code. must show terms know rights. Developers use GNU GPL protect rights two steps: (1) assert copyright software, (2) offer License giving legal permission copy, distribute /modify . developers’ authors’ protection, GPL clearly explains warranty free software. users’ authors’ sake, GPL requires modified versions marked changed, problems attributed erroneously authors previous versions. devices designed deny users access install run modified versions software inside , although manufacturer can . fundamentally incompatible aim protecting users’ freedom change software. systematic pattern abuse occurs area products individuals use, precisely unacceptable. Therefore, designed version GPL prohibit practice products. problems arise substantially domains, stand ready extend provision domains future versions GPL, needed protect freedom users. Finally, every program threatened constantly software patents. States allow patents restrict development use software general-purpose computers, , wish avoid special danger patents applied free program make effectively proprietary. prevent , GPL assures patents used render program non-free. precise terms conditions copying, distribution modification follow.","code":""},{"path":[]},{"path":"https://agdamsbo.github.io/REDCapCAST/LICENSE.html","id":"id_0-definitions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"0. Definitions","title":"GNU General Public License","text":"“License” refers version 3 GNU General Public License. “Copyright” also means copyright-like laws apply kinds works, semiconductor masks. “Program” refers copyrightable work licensed License. licensee addressed “”. “Licensees” “recipients” may individuals organizations. “modify” work means copy adapt part work fashion requiring copyright permission, making exact copy. resulting work called “modified version” earlier work work “based ” earlier work. “covered work” means either unmodified Program work based Program. “propagate” work means anything , without permission, make directly secondarily liable infringement applicable copyright law, except executing computer modifying private copy. Propagation includes copying, distribution (without modification), making available public, countries activities well. “convey” work means kind propagation enables parties make receive copies. Mere interaction user computer network, transfer copy, conveying. interactive user interface displays “Appropriate Legal Notices” extent includes convenient prominently visible feature (1) displays appropriate copyright notice, (2) tells user warranty work (except extent warranties provided), licensees may convey work License, view copy License. interface presents list user commands options, menu, prominent item list meets criterion.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/LICENSE.html","id":"id_1-source-code","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"1. Source Code","title":"GNU General Public License","text":"“source code” work means preferred form work making modifications . “Object code” means non-source form work. “Standard Interface” means interface either official standard defined recognized standards body, , case interfaces specified particular programming language, one widely used among developers working language. “System Libraries” executable work include anything, work whole, () included normal form packaging Major Component, part Major Component, (b) serves enable use work Major Component, implement Standard Interface implementation available public source code form. “Major Component”, context, means major essential component (kernel, window system, ) specific operating system () executable work runs, compiler used produce work, object code interpreter used run . “Corresponding Source” work object code form means source code needed generate, install, (executable work) run object code modify work, including scripts control activities. However, include work’s System Libraries, general-purpose tools generally available free programs used unmodified performing activities part work. example, Corresponding Source includes interface definition files associated source files work, source code shared libraries dynamically linked subprograms work specifically designed require, intimate data communication control flow subprograms parts work. Corresponding Source need include anything users can regenerate automatically parts Corresponding Source. Corresponding Source work source code form work.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/LICENSE.html","id":"id_2-basic-permissions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"2. Basic Permissions","title":"GNU General Public License","text":"rights granted License granted term copyright Program, irrevocable provided stated conditions met. License explicitly affirms unlimited permission run unmodified Program. output running covered work covered License output, given content, constitutes covered work. License acknowledges rights fair use equivalent, provided copyright law. may make, run propagate covered works convey, without conditions long license otherwise remains force. may convey covered works others sole purpose make modifications exclusively , provide facilities running works, provided comply terms License conveying material control copyright. thus making running covered works must exclusively behalf, direction control, terms prohibit making copies copyrighted material outside relationship . Conveying circumstances permitted solely conditions stated . Sublicensing allowed; section 10 makes unnecessary.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/LICENSE.html","id":"id_3-protecting-users-legal-rights-from-anti-circumvention-law","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"3. Protecting Users’ Legal Rights From Anti-Circumvention Law","title":"GNU General Public License","text":"covered work shall deemed part effective technological measure applicable law fulfilling obligations article 11 WIPO copyright treaty adopted 20 December 1996, similar laws prohibiting restricting circumvention measures. convey covered work, waive legal power forbid circumvention technological measures extent circumvention effected exercising rights License respect covered work, disclaim intention limit operation modification work means enforcing, work’s users, third parties’ legal rights forbid circumvention technological measures.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/LICENSE.html","id":"id_4-conveying-verbatim-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"4. Conveying Verbatim Copies","title":"GNU General Public License","text":"may convey verbatim copies Program’s source code receive , medium, provided conspicuously appropriately publish copy appropriate copyright notice; keep intact notices stating License non-permissive terms added accord section 7 apply code; keep intact notices absence warranty; give recipients copy License along Program. may charge price price copy convey, may offer support warranty protection fee.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/LICENSE.html","id":"id_5-conveying-modified-source-versions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"5. Conveying Modified Source Versions","title":"GNU General Public License","text":"may convey work based Program, modifications produce Program, form source code terms section 4, provided also meet conditions: ) work must carry prominent notices stating modified , giving relevant date. b) work must carry prominent notices stating released License conditions added section 7. requirement modifies requirement section 4 “keep intact notices”. c) must license entire work, whole, License anyone comes possession copy. License therefore apply, along applicable section 7 additional terms, whole work, parts, regardless packaged. License gives permission license work way, invalidate permission separately received . d) work interactive user interfaces, must display Appropriate Legal Notices; however, Program interactive interfaces display Appropriate Legal Notices, work need make . compilation covered work separate independent works, nature extensions covered work, combined form larger program, volume storage distribution medium, called “aggregate” compilation resulting copyright used limit access legal rights compilation’s users beyond individual works permit. Inclusion covered work aggregate cause License apply parts aggregate.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/LICENSE.html","id":"id_6-conveying-non-source-forms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"6. Conveying Non-Source Forms","title":"GNU General Public License","text":"may convey covered work object code form terms sections 4 5, provided also convey machine-readable Corresponding Source terms License, one ways: ) Convey object code , embodied , physical product (including physical distribution medium), accompanied Corresponding Source fixed durable physical medium customarily used software interchange. b) Convey object code , embodied , physical product (including physical distribution medium), accompanied written offer, valid least three years valid long offer spare parts customer support product model, give anyone possesses object code either (1) copy Corresponding Source software product covered License, durable physical medium customarily used software interchange, price reasonable cost physically performing conveying source, (2) access copy Corresponding Source network server charge. c) Convey individual copies object code copy written offer provide Corresponding Source. alternative allowed occasionally noncommercially, received object code offer, accord subsection 6b. d) Convey object code offering access designated place (gratis charge), offer equivalent access Corresponding Source way place charge. need require recipients copy Corresponding Source along object code. place copy object code network server, Corresponding Source may different server (operated third party) supports equivalent copying facilities, provided maintain clear directions next object code saying find Corresponding Source. Regardless server hosts Corresponding Source, remain obligated ensure available long needed satisfy requirements. e) Convey object code using peer--peer transmission, provided inform peers object code Corresponding Source work offered general public charge subsection 6d. separable portion object code, whose source code excluded Corresponding Source System Library, need included conveying object code work. “User Product” either (1) “consumer product”, means tangible personal property normally used personal, family, household purposes, (2) anything designed sold incorporation dwelling. determining whether product consumer product, doubtful cases shall resolved favor coverage. particular product received particular user, “normally used” refers typical common use class product, regardless status particular user way particular user actually uses, expects expected use, product. product consumer product regardless whether product substantial commercial, industrial non-consumer uses, unless uses represent significant mode use product. “Installation Information” User Product means methods, procedures, authorization keys, information required install execute modified versions covered work User Product modified version Corresponding Source. information must suffice ensure continued functioning modified object code case prevented interfered solely modification made. convey object code work section , , specifically use , User Product, conveying occurs part transaction right possession use User Product transferred recipient perpetuity fixed term (regardless transaction characterized), Corresponding Source conveyed section must accompanied Installation Information. requirement apply neither third party retains ability install modified object code User Product (example, work installed ROM). requirement provide Installation Information include requirement continue provide support service, warranty, updates work modified installed recipient, User Product modified installed. Access network may denied modification materially adversely affects operation network violates rules protocols communication across network. Corresponding Source conveyed, Installation Information provided, accord section must format publicly documented (implementation available public source code form), must require special password key unpacking, reading copying.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/LICENSE.html","id":"id_7-additional-terms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"7. Additional Terms","title":"GNU General Public License","text":"“Additional permissions” terms supplement terms License making exceptions one conditions. Additional permissions applicable entire Program shall treated though included License, extent valid applicable law. additional permissions apply part Program, part may used separately permissions, entire Program remains governed License without regard additional permissions. convey copy covered work, may option remove additional permissions copy, part . (Additional permissions may written require removal certain cases modify work.) may place additional permissions material, added covered work, can give appropriate copyright permission. Notwithstanding provision License, material add covered work, may (authorized copyright holders material) supplement terms License terms: ) Disclaiming warranty limiting liability differently terms sections 15 16 License; b) Requiring preservation specified reasonable legal notices author attributions material Appropriate Legal Notices displayed works containing ; c) Prohibiting misrepresentation origin material, requiring modified versions material marked reasonable ways different original version; d) Limiting use publicity purposes names licensors authors material; e) Declining grant rights trademark law use trade names, trademarks, service marks; f) Requiring indemnification licensors authors material anyone conveys material (modified versions ) contractual assumptions liability recipient, liability contractual assumptions directly impose licensors authors. non-permissive additional terms considered “restrictions” within meaning section 10. Program received , part , contains notice stating governed License along term restriction, may remove term. license document contains restriction permits relicensing conveying License, may add covered work material governed terms license document, provided restriction survive relicensing conveying. add terms covered work accord section, must place, relevant source files, statement additional terms apply files, notice indicating find applicable terms. Additional terms, permissive non-permissive, may stated form separately written license, stated exceptions; requirements apply either way.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/LICENSE.html","id":"id_8-termination","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"8. Termination","title":"GNU General Public License","text":"may propagate modify covered work except expressly provided License. attempt otherwise propagate modify void, automatically terminate rights License (including patent licenses granted third paragraph section 11). However, cease violation License, license particular copyright holder reinstated () provisionally, unless copyright holder explicitly finally terminates license, (b) permanently, copyright holder fails notify violation reasonable means prior 60 days cessation. Moreover, license particular copyright holder reinstated permanently copyright holder notifies violation reasonable means, first time received notice violation License (work) copyright holder, cure violation prior 30 days receipt notice. Termination rights section terminate licenses parties received copies rights License. rights terminated permanently reinstated, qualify receive new licenses material section 10.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/LICENSE.html","id":"id_9-acceptance-not-required-for-having-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"9. Acceptance Not Required for Having Copies","title":"GNU General Public License","text":"required accept License order receive run copy Program. Ancillary propagation covered work occurring solely consequence using peer--peer transmission receive copy likewise require acceptance. However, nothing License grants permission propagate modify covered work. actions infringe copyright accept License. Therefore, modifying propagating covered work, indicate acceptance License .","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/LICENSE.html","id":"id_10-automatic-licensing-of-downstream-recipients","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"10. Automatic Licensing of Downstream Recipients","title":"GNU General Public License","text":"time convey covered work, recipient automatically receives license original licensors, run, modify propagate work, subject License. responsible enforcing compliance third parties License. “entity transaction” transaction transferring control organization, substantially assets one, subdividing organization, merging organizations. propagation covered work results entity transaction, party transaction receives copy work also receives whatever licenses work party’s predecessor interest give previous paragraph, plus right possession Corresponding Source work predecessor interest, predecessor can get reasonable efforts. may impose restrictions exercise rights granted affirmed License. example, may impose license fee, royalty, charge exercise rights granted License, may initiate litigation (including cross-claim counterclaim lawsuit) alleging patent claim infringed making, using, selling, offering sale, importing Program portion .","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/LICENSE.html","id":"id_11-patents","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"11. Patents","title":"GNU General Public License","text":"“contributor” copyright holder authorizes use License Program work Program based. work thus licensed called contributor’s “contributor version”. contributor’s “essential patent claims” patent claims owned controlled contributor, whether already acquired hereafter acquired, infringed manner, permitted License, making, using, selling contributor version, include claims infringed consequence modification contributor version. purposes definition, “control” includes right grant patent sublicenses manner consistent requirements License. contributor grants non-exclusive, worldwide, royalty-free patent license contributor’s essential patent claims, make, use, sell, offer sale, import otherwise run, modify propagate contents contributor version. following three paragraphs, “patent license” express agreement commitment, however denominated, enforce patent (express permission practice patent covenant sue patent infringement). “grant” patent license party means make agreement commitment enforce patent party. convey covered work, knowingly relying patent license, Corresponding Source work available anyone copy, free charge terms License, publicly available network server readily accessible means, must either (1) cause Corresponding Source available, (2) arrange deprive benefit patent license particular work, (3) arrange, manner consistent requirements License, extend patent license downstream recipients. “Knowingly relying” means actual knowledge , patent license, conveying covered work country, recipient’s use covered work country, infringe one identifiable patents country reason believe valid. , pursuant connection single transaction arrangement, convey, propagate procuring conveyance , covered work, grant patent license parties receiving covered work authorizing use, propagate, modify convey specific copy covered work, patent license grant automatically extended recipients covered work works based . patent license “discriminatory” include within scope coverage, prohibits exercise , conditioned non-exercise one rights specifically granted License. may convey covered work party arrangement third party business distributing software, make payment third party based extent activity conveying work, third party grants, parties receive covered work , discriminatory patent license () connection copies covered work conveyed (copies made copies), (b) primarily connection specific products compilations contain covered work, unless entered arrangement, patent license granted, prior 28 March 2007. Nothing License shall construed excluding limiting implied license defenses infringement may otherwise available applicable patent law.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/LICENSE.html","id":"id_12-no-surrender-of-others-freedom","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"12. No Surrender of Others’ Freedom","title":"GNU General Public License","text":"conditions imposed (whether court order, agreement otherwise) contradict conditions License, excuse conditions License. convey covered work satisfy simultaneously obligations License pertinent obligations, consequence may convey . example, agree terms obligate collect royalty conveying convey Program, way satisfy terms License refrain entirely conveying Program.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/LICENSE.html","id":"id_13-use-with-the-gnu-affero-general-public-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"13. Use with the GNU Affero General Public License","title":"GNU General Public License","text":"Notwithstanding provision License, permission link combine covered work work licensed version 3 GNU Affero General Public License single combined work, convey resulting work. terms License continue apply part covered work, special requirements GNU Affero General Public License, section 13, concerning interaction network apply combination .","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/LICENSE.html","id":"id_14-revised-versions-of-this-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"14. Revised Versions of this License","title":"GNU General Public License","text":"Free Software Foundation may publish revised /new versions GNU General Public License time time. new versions similar spirit present version, may differ detail address new problems concerns. version given distinguishing version number. Program specifies certain numbered version GNU General Public License “later version” applies , option following terms conditions either numbered version later version published Free Software Foundation. Program specify version number GNU General Public License, may choose version ever published Free Software Foundation. Program specifies proxy can decide future versions GNU General Public License can used, proxy’s public statement acceptance version permanently authorizes choose version Program. Later license versions may give additional different permissions. However, additional obligations imposed author copyright holder result choosing follow later version.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/LICENSE.html","id":"id_15-disclaimer-of-warranty","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"15. Disclaimer of Warranty","title":"GNU General Public License","text":"WARRANTY PROGRAM, EXTENT PERMITTED APPLICABLE LAW. EXCEPT OTHERWISE STATED WRITING COPYRIGHT HOLDERS /PARTIES PROVIDE PROGRAM “” WITHOUT WARRANTY KIND, EITHER EXPRESSED IMPLIED, INCLUDING, LIMITED , IMPLIED WARRANTIES MERCHANTABILITY FITNESS PARTICULAR PURPOSE. ENTIRE RISK QUALITY PERFORMANCE PROGRAM . PROGRAM PROVE DEFECTIVE, ASSUME COST NECESSARY SERVICING, REPAIR CORRECTION.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/LICENSE.html","id":"id_16-limitation-of-liability","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"16. Limitation of Liability","title":"GNU General Public License","text":"EVENT UNLESS REQUIRED APPLICABLE LAW AGREED WRITING COPYRIGHT HOLDER, PARTY MODIFIES /CONVEYS PROGRAM PERMITTED , LIABLE DAMAGES, INCLUDING GENERAL, SPECIAL, INCIDENTAL CONSEQUENTIAL DAMAGES ARISING USE INABILITY USE PROGRAM (INCLUDING LIMITED LOSS DATA DATA RENDERED INACCURATE LOSSES SUSTAINED THIRD PARTIES FAILURE PROGRAM OPERATE PROGRAMS), EVEN HOLDER PARTY ADVISED POSSIBILITY DAMAGES.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/LICENSE.html","id":"id_17-interpretation-of-sections-15-and-16","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"17. Interpretation of Sections 15 and 16","title":"GNU General Public License","text":"disclaimer warranty limitation liability provided given local legal effect according terms, reviewing courts shall apply local law closely approximates absolute waiver civil liability connection Program, unless warranty assumption liability accompanies copy Program return fee. END TERMS CONDITIONS","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/LICENSE.html","id":"how-to-apply-these-terms-to-your-new-programs","dir":"","previous_headings":"","what":"How to Apply These Terms to Your New Programs","title":"GNU General Public License","text":"develop new program, want greatest possible use public, best way achieve make free software everyone can redistribute change terms. , attach following notices program. safest attach start source file effectively state exclusion warranty; file least “copyright” line pointer full notice found. Also add information contact electronic paper mail. program terminal interaction, make output short notice like starts interactive mode: hypothetical commands show w show c show appropriate parts General Public License. course, program’s commands might different; GUI interface, use “box”. also get employer (work programmer) school, , sign “copyright disclaimer” program, necessary. information , apply follow GNU GPL, see . GNU General Public License permit incorporating program proprietary programs. program subroutine library, may consider useful permit linking proprietary applications library. want , use GNU Lesser General Public License instead License. first, please read .","code":" Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are welcome to redistribute it under certain conditions; type 'show c' for details."},{"path":"https://agdamsbo.github.io/REDCapCAST/articles/Database-creation.html","id":"two-different-ways-to-create-a-data-base","dir":"Articles","previous_headings":"","what":"Two different ways to create a data base","title":"Database-creation","text":"REDCapCAST provides two approaches creating data dictionary aimed helping two different cases: Easily create REDCap data base existing data set. Create table Word describing variables data base use create data base. following try come suggestions use approaches.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/articles/Database-creation.html","id":"easy-data-set-to-data-base-workflow","dir":"Articles","previous_headings":"Two different ways to create a data base","what":"Easy data set to data base workflow","title":"Database-creation","text":"first iteration dataset data dictionary function ds2dd(), creates basic data dictionary variables stored text. sufficient just storing old datasets/spreadsheets securely REDCap. advanced ds2dd_detailed() natural development. try apply common data classes data validation assume first column id number. outputs list dataset modified variable names comply REDCap naming conventions data dictionary. dataset correctly formatted data dictionary preserve much information possible. Additional specifications DataDictionary can made manually, can uploaded modified manually graphical user interface REDCap server.","code":"d1 <- mtcars |> dplyr::mutate(record_id = seq_len(dplyr::n())) |> ds2dd() d1 |> gt::gt() d2 <- REDCapCAST::redcapcast_data |> dplyr::mutate(record_id = seq_len(dplyr::n()), region=factor(region)) |> dplyr::select(record_id, dplyr::everything()) |> (\\(.x){ .x[!grepl(\"_complete$\",names(.x))] })() |> (\\(.x){ .x[!grepl(\"^redcap\",names(.x))] })() |> ds2dd_detailed() |> purrr::pluck(\"meta\") d2 |> gt::gt()"},{"path":"https://agdamsbo.github.io/REDCapCAST/articles/Database-creation.html","id":"data-base-from-table","dir":"Articles","previous_headings":"Two different ways to create a data base","what":"Data base from table","title":"Database-creation","text":"…instructions examples coming…","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/articles/Database-creation.html","id":"meta-data-and-data-upload","dir":"Articles","previous_headings":"Two different ways to create a data base","what":"Meta data and data upload","title":"Database-creation","text":"Now DataDictionary can exported spreadsheet uploaded can uploaded using REDCapR package (projects “Development” status). Use one two approaches :","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/articles/Database-creation.html","id":"manual-upload","dir":"Articles","previous_headings":"Two different ways to create a data base > Meta data and data upload","what":"Manual upload","title":"Database-creation","text":"","code":"write.csv(dd_ls$meta, \"datadictionary.csv\")"},{"path":"https://agdamsbo.github.io/REDCapCAST/articles/Database-creation.html","id":"upload-with-redcapr","dir":"Articles","previous_headings":"Two different ways to create a data base > Meta data and data upload","what":"Upload with REDCapR","title":"Database-creation","text":"“REDCap R Handbook” written interfacing REDCap R using library(keyring)store credentials chapter 1.1.","code":"REDCapR::redcap_metadata_write( dd_ls$meta, redcap_uri = keyring::key_get(\"DB_URI\"), token = keyring::key_get(\"DB_TOKEN\") )"},{"path":"https://agdamsbo.github.io/REDCapCAST/articles/Database-creation.html","id":"step-4---data-upload","dir":"Articles","previous_headings":"Two different ways to create a data base","what":"Step 4 - Data upload","title":"Database-creation","text":"two options available data upload meta data upload: manual REDCapR. latter shown .","code":"REDCapR::redcap_write( dd_ls$data, redcap_uri = keyring::key_get(\"DB_URI\"), token = keyring::key_get(\"DB_TOKEN\") )"},{"path":"https://agdamsbo.github.io/REDCapCAST/articles/REDCapCAST.html","id":"splitting-the-dataset","dir":"Articles","previous_headings":"","what":"Splitting the dataset","title":"REDCapCAST","text":"","code":"redcapcast_data |> gt::gt() redcapcast_meta |> gt::gt() list <- REDCap_split( records = redcapcast_data, metadata = redcapcast_meta, forms = \"all\" ) |> sanitize_split() str(list) #> List of 4 #> $ baseline_data_start: tibble [6 × 14] (S3: tbl_df/tbl/data.frame) #> ..$ record_id : num [1:6] 1 2 3 4 5 6 #> ..$ redcap_event_name : chr [1:6] \"inclusion\" \"inclusion\" \"inclusion\" \"inclusion\" ... #> ..$ cpr : chr [1:6] \"1203401OB4\" \"0102342303\" \"2301569823\" \"0204051342\" ... #> ..$ inclusion : Date[1:6], format: \"2023-03-13\" \"2023-03-01\" ... #> ..$ inclusion_time : 'hms' num [1:6] 12:38:49 10:38:57 12:01:07 20:39:19 ... #> .. ..- attr(*, \"units\")= chr \"secs\" #> ..$ dob : Date[1:6], format: \"1940-03-12\" \"1934-02-01\" ... #> ..$ age : num [1:6] 83 89.1 66.1 117.9 126.2 ... #> ..$ age_integer : num [1:6] 83 89 66 117 126 91 #> ..$ sex : chr [1:6] \"female\" \"male\" \"male\" \"female\" ... #> ..$ cohabitation : chr [1:6] \"Yes\" \"Yes\" \"No\" NA ... #> ..$ hypertension : chr [1:6] \"No\" \"No\" \"Yes\" NA ... #> ..$ diabetes : chr [1:6] \"Yes\" \"No\" \"Yes\" NA ... #> ..$ region : chr [1:6] \"East\" \"South\" \"North\" NA ... #> ..$ baseline_data_start_complete: chr [1:6] \"Incomplete\" \"Incomplete\" \"Incomplete\" \"Incomplete\" ... #> ..- attr(*, \"problems\")= #> $ mrs : tibble [5 × 6] (S3: tbl_df/tbl/data.frame) #> ..$ record_id : num [1:5] 1 2 2 3 3 #> ..$ redcap_event_name: chr [1:5] \"inclusion\" \"inclusion\" \"follow1\" \"follow1\" ... #> ..$ mrs_assessed : chr [1:5] \"Yes\" \"Yes\" \"Yes\" \"Yes\" ... #> ..$ mrs_date : Date[1:5], format: \"2023-03-13\" \"2023-03-07\" ... #> ..$ mrs_score : num [1:5] 1 1 3 2 1 #> ..$ mrs_complete : chr [1:5] \"Incomplete\" \"Incomplete\" \"Incomplete\" \"Incomplete\" ... #> ..- attr(*, \"problems\")= #> $ consensus : tibble [0 × 5] (S3: tbl_df/tbl/data.frame) #> ..$ record_id : num(0) #> ..$ redcap_event_name : chr(0) #> ..$ con_mrs : logi(0) #> ..$ con_calc : logi(0) #> ..$ consensus_complete: chr(0) #> ..- attr(*, \"problems\")= #> $ new_event : tibble [13 × 8] (S3: tbl_df/tbl/data.frame) #> ..$ record_id : num [1:13] 2 3 3 3 3 3 4 4 4 4 ... #> ..$ redcap_event_name : chr [1:13] \"follow1\" \"follow1\" \"follow1\" \"follow2\" ... #> ..$ redcap_repeat_instrument: chr [1:13] \"new_event\" \"new_event\" \"new_event\" \"new_event\" ... #> ..$ redcap_repeat_instance : num [1:13] 1 1 2 1 2 3 1 2 1 2 ... #> ..$ event_datetime : POSIXct[1:13], format: \"2024-01-18 12:49:42\" \"2024-01-18 12:49:58\" ... #> ..$ event_age : num [1:13] NA NA NA NA NA NA 96 105 118 118 ... #> ..$ event_type : chr [1:13] \"TIA\" \"AIS\" \"ICH\" \"ICH\" ... #> ..$ new_event_complete : chr [1:13] \"Incomplete\" \"Incomplete\" \"Incomplete\" \"Incomplete\" ... #> ..- attr(*, \"problems\")="},{"path":"https://agdamsbo.github.io/REDCapCAST/articles/REDCapCAST.html","id":"reading-data-from-redcap","dir":"Articles","previous_headings":"","what":"Reading data from REDCap","title":"REDCapCAST","text":"function wraps demonstrated function get dataset, metadata, apply REDCap_splitfunction bit cleaning. just cuts outs steps easier approach. function works similar REDCapR::redcap_read() allowing specify fields, events forms export instead exporting whole database filtering afterwards. believe better safer, focused approach.","code":"# read_redcap_tables(uri = \"YOUR URI\", token = \"YOUR TOKEN\")"},{"path":"https://agdamsbo.github.io/REDCapCAST/articles/REDCapCAST.html","id":"pivotting-to-wider-format","dir":"Articles","previous_headings":"","what":"Pivotting to wider format","title":"REDCapCAST","text":"","code":"redcap_wider(list) |> str() #> Joining with `by = join_by(record_id)` #> Joining with `by = join_by(record_id)` #> Joining with `by = join_by(record_id)` #> 'data.frame': 6 obs. of 52 variables: #> $ record_id : num 1 2 3 4 5 6 #> $ cpr : chr \"1203401OB4\" \"0102342303\" \"2301569823\" \"0204051342\" ... #> $ inclusion : Date, format: \"2023-03-13\" \"2023-03-01\" ... #> $ inclusion_time : 'hms' num 12:38:49 10:38:57 12:01:07 20:39:19 ... #> ..- attr(*, \"units\")= chr \"secs\" #> $ dob : Date, format: \"1940-03-12\" \"1934-02-01\" ... #> $ age : num 83 89.1 66.1 117.9 126.2 ... #> $ age_integer : num 83 89 66 117 126 91 #> $ sex : chr \"female\" \"male\" \"male\" \"female\" ... #> $ cohabitation : chr \"Yes\" \"Yes\" \"No\" NA ... #> $ hypertension : chr \"No\" \"No\" \"Yes\" NA ... #> $ diabetes : chr \"Yes\" \"No\" \"Yes\" NA ... #> $ region : chr \"East\" \"South\" \"North\" NA ... #> $ baseline_data_start_complete: chr \"Incomplete\" \"Incomplete\" \"Incomplete\" \"Incomplete\" ... #> $ mrs_assessed_inclusion : chr \"Yes\" \"Yes\" NA NA ... #> $ mrs_assessed_follow1 : chr NA \"Yes\" \"Yes\" NA ... #> $ mrs_assessed_follow2 : chr NA NA \"Yes\" NA ... #> $ mrs_date_inclusion : Date, format: \"2023-03-13\" \"2023-03-07\" ... #> $ mrs_date_follow1 : Date, format: NA \"2023-03-09\" ... #> $ mrs_date_follow2 : Date, format: NA NA ... #> $ mrs_score_inclusion : num 1 1 NA NA NA NA #> $ mrs_score_follow1 : num NA 3 2 NA NA NA #> $ mrs_score_follow2 : num NA NA 1 NA NA NA #> $ mrs_complete_inclusion : chr \"Incomplete\" \"Incomplete\" NA NA ... #> $ mrs_complete_follow1 : chr NA \"Incomplete\" \"Incomplete\" NA ... #> $ mrs_complete_follow2 : chr NA NA \"Incomplete\" NA ... #> $ con_mrs : logi NA NA NA NA NA NA #> $ con_calc : logi NA NA NA NA NA NA #> $ consensus_complete : chr NA NA NA NA ... #> $ event_datetime_1_follow1 : POSIXct, format: NA \"2024-01-18 12:49:42\" ... #> $ event_datetime_1_follow2 : POSIXct, format: NA NA ... #> $ event_age_1_follow1 : num NA NA NA 96 127 NA #> $ event_age_1_follow2 : num NA NA NA 118 NA NA #> $ event_type_1_follow1 : chr NA \"TIA\" \"AIS\" \"TIA\" ... #> $ event_type_1_follow2 : chr NA NA \"ICH\" \"AIS\" ... #> $ new_event_complete_1_follow1: chr NA \"Incomplete\" \"Incomplete\" \"Complete\" ... #> $ new_event_complete_1_follow2: chr NA NA \"Incomplete\" \"Complete\" ... #> $ event_datetime_2_follow1 : POSIXct, format: NA NA ... #> $ event_datetime_2_follow2 : POSIXct, format: NA NA ... #> $ event_datetime_3_follow1 : POSIXct, format: NA NA ... #> $ event_datetime_3_follow2 : POSIXct, format: NA NA ... #> $ event_age_2_follow1 : num NA NA NA 105 127 NA #> $ event_age_2_follow2 : num NA NA NA 118 NA NA #> $ event_age_3_follow1 : num NA NA NA NA NA NA #> $ event_age_3_follow2 : num NA NA NA 118 NA NA #> $ event_type_2_follow1 : chr NA NA \"ICH\" \"TIA\" ... #> $ event_type_2_follow2 : chr NA NA \"TIA\" \"ICH\" ... #> $ event_type_3_follow1 : chr NA NA NA NA ... #> $ event_type_3_follow2 : chr NA NA \"AIS\" \"Unknown\" ... #> $ new_event_complete_2_follow1: chr NA NA \"Incomplete\" \"Complete\" ... #> $ new_event_complete_2_follow2: chr NA NA \"Incomplete\" \"Incomplete\" ... #> $ new_event_complete_3_follow1: chr NA NA NA NA ... #> $ new_event_complete_3_follow2: chr NA NA \"Incomplete\" \"Complete\" ..."},{"path":"https://agdamsbo.github.io/REDCapCAST/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Andreas Gammelgaard Damsbo. Author, maintainer. Paul Egeler. Author.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Damsbo , Egeler P (2024). REDCapCAST: REDCap Metadata Casting Castellated Data Handling. R package version 24.11.4, https://agdamsbo.github.io/REDCapCAST/, https://github.com/agdamsbo/REDCapCAST.","code":"@Manual{, title = {REDCapCAST: REDCap Metadata Casting and Castellated Data Handling}, author = {Andreas Gammelgaard Damsbo and Paul Egeler}, year = {2024}, note = {R package version 24.11.4, https://agdamsbo.github.io/REDCapCAST/}, url = {https://github.com/agdamsbo/REDCapCAST}, }"},{"path":"https://agdamsbo.github.io/REDCapCAST/index.html","id":"redcapcast-package-","dir":"","previous_headings":"","what":"REDCap Metadata Casting and Castellated Data Handling","title":"REDCap Metadata Casting and Castellated Data Handling","text":"Casting metadata REDCap database creation handling castellated data using repeated instruments longitudinal projects REDCap. implemented app-interface easy database creation accessible available run locally shiny_cast() allowing easily create REDCap database based existing spreadsheet. Export data REDCap different formats handling castellated data, default export requested data, mainly read_redcap_tables(). REDCapCAST initially build , still includes code pegeler/REDCapRITS, relies functions REDCapR-project","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/index.html","id":"history","dir":"","previous_headings":"","what":"History","title":"REDCap Metadata Casting and Castellated Data Handling","text":"package originally forked pegeler/REDCapRITS. REDCapRITS represents great extensive work handle castellated REDCap data different programming languages. REDCapCAST evolved much just handling castellated data detatched original project still relying main REDCap_split function. access REDCap database build outstanding work REDCapR. package really started frustration PhD health science hearing colleagues complaining “castellated” data formatting REDCap exports longitudinal projects used wide data. led bad decisions building databases avoiding repeated instruments. package solves challenges, solutions also implemented else like redcapAPI REDCapTidieR packages, bigger project. help new PhD students researchers, also worked creating helper/wrapper-functions ease data access. Documentation ’s way. advanced uses, consider using redcapAPI REDCapR packages.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/index.html","id":"future","dir":"","previous_headings":"","what":"Future","title":"REDCap Metadata Casting and Castellated Data Handling","text":"plan package bundled Handbook working REDCap R. work progress limited time available. Please feel free contact create issue ideas future additions.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/index.html","id":"installation-and-use","dir":"","previous_headings":"","what":"Installation and use","title":"REDCap Metadata Casting and Castellated Data Handling","text":"package available CRAN. Install latest version: Install latest version directly GitHub: Launch REDCapCAST app interface directly machine:","code":"install.packages(\"REDCapCAST\") require(\"remotes\") remotes::install_github(\"agdamsbo/REDCapCAST\") REDCapCAST::shiny_cast()"},{"path":"https://agdamsbo.github.io/REDCapCAST/index.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"REDCap Metadata Casting and Castellated Data Handling","text":"Please note REDCapCAST project released Contributor Code Conduct. contributing project, agree abide terms.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/REDCapCAST-package.html","id":null,"dir":"Reference","previous_headings":"","what":"REDCapCAST: REDCap Metadata Casting and Castellated Data Handling — REDCapCAST-package","title":"REDCapCAST: REDCap Metadata Casting and Castellated Data Handling — REDCapCAST-package","text":"Casting metadata REDCap database creation handling castellated data using repeated instruments longitudinal projects 'REDCap'. Keeps focused data export approach, allowing export required data database. Also casting new REDCap databases based datasets sources. Originally forked R part 'REDCapRITS' Paul Egeler. See https://github.com/pegeler/REDCapRITS. 'REDCap' (Research Electronic Data Capture) secure, web-based software platform designed support data capture research studies, providing 1) intuitive interface validated data capture; 2) audit trails tracking data manipulation export procedures; 3) automated export procedures seamless data downloads common statistical packages; 4) procedures data integration interoperability 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 ).","code":""},{"path":[]},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/REDCapCAST-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"REDCapCAST: REDCap Metadata Casting and Castellated Data Handling — REDCapCAST-package","text":"Maintainer: Andreas Gammelgaard Damsbo agdamsbo@clin.au.dk (ORCID) Authors: Paul Egeler paulegeler@gmail.com (ORCID)","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/REDCap_split.html","id":null,"dir":"Reference","previous_headings":"","what":"Split REDCap repeating instruments table into multiple tables — REDCap_split","title":"Split REDCap repeating instruments table into multiple tables — REDCap_split","text":"take output REDCap export split base table child tables repeating instrument. Metadata used determine fields included resultant table.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/REDCap_split.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Split REDCap repeating instruments table into multiple tables — REDCap_split","text":"","code":"REDCap_split( records, metadata, primary_table_name = \"\", forms = c(\"repeating\", \"all\") )"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/REDCap_split.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Split REDCap repeating instruments table into multiple tables — REDCap_split","text":"records Exported project records. May data.frame, response, character vector containing JSON API call. metadata Project metadata (data dictionary). May data.frame, response, character vector containing JSON API call. primary_table_name Name given list element primary output table (described README.md). Ignored forms = ''. forms Indicate whether create separate tables repeating instruments forms.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/REDCap_split.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Split REDCap repeating instruments table into multiple tables — REDCap_split","text":"list \"data.frame\"s. number tables differ depending forms option selected. 'repeating': one base table one tables repeating instrument. '': data.frame instrument, regardless whether repeating instrument .","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/REDCap_split.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Split REDCap repeating instruments table into multiple tables — REDCap_split","text":"Paul W. Egeler, M.S., GStat","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/REDCap_split.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Split REDCap repeating instruments table into multiple tables — REDCap_split","text":"","code":"if (FALSE) { # \\dontrun{ # Using an API call ------------------------------------------------------- library(RCurl) # Get the records records <- postForm( uri = api_url, # Supply your site-specific URI token = api_token, # Supply your own API token content = \"record\", format = \"json\", returnFormat = \"json\" ) # Get the metadata metadata <- postForm( uri = api_url, # Supply your site-specific URI token = api_token, # Supply your own API token content = \"metadata\", format = \"json\" ) # Convert exported JSON strings into a list of data.frames REDCapRITS::REDCap_split(records, metadata) # Using a raw data export ------------------------------------------------- # Get the records records <- read.csv(\"/path/to/data/ExampleProject_DATA_2018-06-03_1700.csv\") # Get the metadata metadata <- read.csv( \"/path/to/data/ExampleProject_DataDictionary_2018-06-03.csv\" ) # Split the tables REDCapRITS::REDCap_split(records, metadata) # In conjunction with the R export script --------------------------------- # You must set the working directory first since the REDCap data export # script contains relative file references. old <- getwd() setwd(\"/path/to/data/\") # Run the data export script supplied by REDCap. # This will create a data.frame of your records called 'data' source(\"ExampleProject_R_2018-06-03_1700.r\") # Get the metadatan metadata <- read.csv(\"ExampleProject_DataDictionary_2018-06-03.csv\") # Split the tables REDCapRITS::REDCap_split(data, metadata) setwd(old) } # }"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/all_na.html","id":null,"dir":"Reference","previous_headings":"","what":"Check if vector is all NA — all_na","title":"Check if vector is all NA — all_na","text":"Check vector NA","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/all_na.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check if vector is all NA — all_na","text":"","code":"all_na(data)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/all_na.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check if vector is all NA — all_na","text":"data vector data.frame","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/all_na.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check if vector is all NA — all_na","text":"logical","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/all_na.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check if vector is all NA — all_na","text":"","code":"rep(NA, 4) |> all_na() #> [1] TRUE"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/as_factor.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert labelled vectors to factors while preserving attributes — as_factor","title":"Convert labelled vectors to factors while preserving attributes — as_factor","text":"extends [forcats::as_factor()] well [haven::as_factor()], appending original attributes except \"class\" converting factor avoid ta loss case rich formatted labelled data.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/as_factor.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert labelled vectors to factors while preserving attributes — as_factor","text":"","code":"as_factor(x, ...) # S3 method for class 'factor' as_factor(x, ...) # S3 method for class 'logical' as_factor(x, ...) # S3 method for class 'numeric' as_factor(x, ...) # S3 method for class 'character' as_factor(x, ...) # S3 method for class 'haven_labelled' as_factor( x, levels = c(\"default\", \"labels\", \"values\", \"both\"), ordered = FALSE, ... ) # S3 method for class 'labelled' as_factor( x, levels = c(\"default\", \"labels\", \"values\", \"both\"), ordered = FALSE, ... )"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/as_factor.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert labelled vectors to factors while preserving attributes — as_factor","text":"x Object coerce factor. ... arguments passed method. levels create levels generated factor: * \"default\": uses labels available, otherwise values. Labels sorted value. * \"\": like \"default\", pastes together level value * \"label\": use labels; unlabelled values become `NA` * \"values\": use values ordered `TRUE` create ordered (ordinal) factor, `FALSE` (default) create regular (nominal) factor.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/as_factor.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert labelled vectors to factors while preserving attributes — as_factor","text":"Please refer parent functions extended documentation. avoid redundancy calls errors, functions copy-pasted ","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/as_factor.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert labelled vectors to factors while preserving attributes — as_factor","text":"","code":"# will preserve all attributes c(1, 4, 3, \"A\", 7, 8, 1) |> as_factor() #> Warning: invalid roman numeral: A #> [1] 1 4 3 A 7 8 1 #> Levels: 1 4 3 A 7 8 structure(c(1, 2, 3, 2, 10, 9), labels = c(Unknown = 9, Refused = 10) ) |> as_factor() |> dput() #> structure(c(1L, 2L, 3L, 2L, 5L, 4L), levels = c(\"1\", \"2\", \"3\", #> \"9\", \"10\"), class = \"factor\", labels = c(Unknown = 9, Refused = 10 #> )) structure(c(1, 2, 3, 2, 10, 9), labels = c(Unknown = 9, Refused = 10), class = \"haven_labelled\" ) |> as_factor() #> [1] 1 2 3 2 Refused Unknown #> attr(,\"labels\") #> Unknown Refused #> 9 10 #> Levels: 1 2 3 Unknown Refused"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/case_match_regex_list.html","id":null,"dir":"Reference","previous_headings":"","what":"List-base regex case_when — case_match_regex_list","title":"List-base regex case_when — case_match_regex_list","text":"Mimics case_when list regex patterns values. Used date/time validation generation name vector. Like case_when, matches order priority. Primarily used REDCapCAST data type coding systematic variable naming.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/case_match_regex_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List-base regex case_when — case_match_regex_list","text":"","code":"case_match_regex_list(data, match.list, .default = NA)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/case_match_regex_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List-base regex case_when — case_match_regex_list","text":"data vector match.list list case matches .default Default value non-matches. Default NA.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/case_match_regex_list.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List-base regex case_when — case_match_regex_list","text":"vector","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/case_match_regex_list.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"List-base regex case_when — case_match_regex_list","text":"","code":"case_match_regex_list( c(\"test_date\", \"test_time\", \"test_tida\", \"test_tid\"), list(date_dmy = \"_dat[eo]$\", time_hh_mm_ss = \"_ti[md]e?$\") ) #> [1] \"date_dmy\" \"time_hh_mm_ss\" NA \"time_hh_mm_ss\""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/cast_data_overview.html","id":null,"dir":"Reference","previous_headings":"","what":"Overview of REDCapCAST data for shiny — cast_data_overview","title":"Overview of REDCapCAST data for shiny — cast_data_overview","text":"Overview REDCapCAST data shiny","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/cast_data_overview.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Overview of REDCapCAST data for shiny — cast_data_overview","text":"","code":"cast_data_overview(data)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/cast_data_overview.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Overview of REDCapCAST data for shiny — cast_data_overview","text":"data list class 'REDCapCAST'","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/cast_data_overview.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Overview of REDCapCAST data for shiny — cast_data_overview","text":"gt object","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/cast_meta_overview.html","id":null,"dir":"Reference","previous_headings":"","what":"Overview of REDCapCAST meta data for shiny — cast_meta_overview","title":"Overview of REDCapCAST meta data for shiny — cast_meta_overview","text":"Overview REDCapCAST meta data shiny","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/cast_meta_overview.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Overview of REDCapCAST meta data for shiny — cast_meta_overview","text":"","code":"cast_meta_overview(data)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/cast_meta_overview.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Overview of REDCapCAST meta data for shiny — cast_meta_overview","text":"data list class 'REDCapCAST'","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/cast_meta_overview.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Overview of REDCapCAST meta data for shiny — cast_meta_overview","text":"gt object","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/char2choice.html","id":null,"dir":"Reference","previous_headings":"","what":"Simple function to generate REDCap choices from character vector — char2choice","title":"Simple function to generate REDCap choices from character vector — char2choice","text":"Simple function generate REDCap choices character vector","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/char2choice.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simple function to generate REDCap choices from character vector — char2choice","text":"","code":"char2choice(data, char.split = \"/\", raw = NULL, .default = NA)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/char2choice.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simple function to generate REDCap choices from character vector — char2choice","text":"data vector char.split splitting character(s) raw specific values. Can used options length. .default default value missing. Default NA.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/char2choice.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Simple function to generate REDCap choices from character vector — char2choice","text":"vector","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/char2choice.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Simple function to generate REDCap choices from character vector — char2choice","text":"","code":"char2choice(c(\"yes/no\",\" yep. / nope \",\"\",NA,\"what\"),.default=NA) #> [1] \"1, yes | 2, no\" \"1, yep. | 2, nope\" NA #> [4] NA \"1, what\""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/char2cond.html","id":null,"dir":"Reference","previous_headings":"","what":"Simple function to generate REDCap branching logic from character vector — char2cond","title":"Simple function to generate REDCap branching logic from character vector — char2cond","text":"Simple function generate REDCap branching logic character vector","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/char2cond.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simple function to generate REDCap branching logic from character vector — char2cond","text":"","code":"char2cond( data, minor.split = \",\", major.split = \";\", major.sep = \" or \", .default = NA )"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/char2cond.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simple function to generate REDCap branching logic from character vector — char2cond","text":"data vector minor.split minor split major.split major split major.sep argument separation. Default \" \". .default default value missing. Default NA.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/char2cond.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Simple function to generate REDCap branching logic from character vector — char2cond","text":"vector","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/char2cond.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Simple function to generate REDCap branching logic from character vector — char2cond","text":"","code":"#data <- dd_inst$betingelse #c(\"Extubation_novent, 2; Pacu_delay, 1\") |> char2cond()"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/clean_field_label.html","id":null,"dir":"Reference","previous_headings":"","what":"Very simple function to remove rich text formatting from field label and save the first paragraph ('

...<\/p>'). — clean_field_label","title":"Very simple function to remove rich text formatting from field label and save the first paragraph ('

...<\/p>'). — clean_field_label","text":"simple function remove rich text formatting field label save first paragraph ('

...<\/p>').","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/clean_field_label.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Very simple function to remove rich text formatting from field label and save the first paragraph ('

...<\/p>'). — clean_field_label","text":"","code":"clean_field_label(data)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/clean_field_label.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Very simple function to remove rich text formatting from field label and save the first paragraph ('

...<\/p>'). — clean_field_label","text":"data field label","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/clean_field_label.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Very simple function to remove rich text formatting from field label and save the first paragraph ('

...<\/p>'). — clean_field_label","text":"character vector","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/clean_field_label.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Very simple function to remove rich text formatting from field label and save the first paragraph ('

...<\/p>'). — clean_field_label","text":"","code":"clean_field_label(\"

Fazekas score<\/p><\/div>\") #> [1] \"Fazekas score\""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/clean_redcap_name.html","id":null,"dir":"Reference","previous_headings":"","what":"clean_redcap_name — clean_redcap_name","title":"clean_redcap_name — clean_redcap_name","text":"Stepwise removal non-alphanumeric characters, trailing white space, substitutes spaces underscores converts lower case. Trying make different naming conventions.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/clean_redcap_name.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"clean_redcap_name — clean_redcap_name","text":"","code":"clean_redcap_name(x)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/clean_redcap_name.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"clean_redcap_name — clean_redcap_name","text":"x vector data frame cleaning","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/clean_redcap_name.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"clean_redcap_name — clean_redcap_name","text":"vector data frame, format input","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/compact_vec.html","id":null,"dir":"Reference","previous_headings":"","what":"Compacting a vector of any length with or without names — compact_vec","title":"Compacting a vector of any length with or without names — compact_vec","text":"Compacting vector length without names","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/compact_vec.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compacting a vector of any length with or without names — compact_vec","text":"","code":"compact_vec(data, nm.sep = \": \", val.sep = \"; \")"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/compact_vec.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compacting a vector of any length with or without names — compact_vec","text":"data vector, optionally named nm.sep string separating name value val.sep string separating values","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/compact_vec.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compacting a vector of any length with or without names — compact_vec","text":"character string","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/compact_vec.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compacting a vector of any length with or without names — compact_vec","text":"","code":"sample(seq_len(4), 20, TRUE) |> as_factor() |> named_levels() |> sort() |> compact_vec() #> [1] \"1: 1; 2: 2; 3: 3; 4: 4\" 1:6 |> compact_vec() #> [1] \"1; 2; 3; 4; 5; 6\" \"test\" |> compact_vec() #> [1] \"test\" sample(letters[1:9], 20, TRUE) |> compact_vec() #> [1] \"g; e; e; b; f; d; b; c; i; f; g; e; f; i; f; e; b; a; d; h\""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/create_html_table.html","id":null,"dir":"Reference","previous_headings":"","what":"Create two-column HTML table for data piping in REDCap instruments — create_html_table","title":"Create two-column HTML table for data piping in REDCap instruments — create_html_table","text":"Create two-column HTML table data piping REDCap instruments","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/create_html_table.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create two-column HTML table for data piping in REDCap instruments — create_html_table","text":"","code":"create_html_table(text, variable)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/create_html_table.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create two-column HTML table for data piping in REDCap instruments — create_html_table","text":"text descriptive text variable variable pipe","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/create_html_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create two-column HTML table for data piping in REDCap instruments — create_html_table","text":"character vector","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/create_html_table.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create two-column HTML table for data piping in REDCap instruments — create_html_table","text":"","code":"create_html_table(text = \"Patient ID\", variable = c(\"[cpr]\")) #>
Patient ID
<\/span><\/h5> <\/td>
[cpr]<\/span><\/h5> <\/td> <\/tr><\/tbody> <\/table> create_html_table(text = paste(\"assessor\", 1:2, sep = \"_\"), variable = c(\"[cpr]\")) #>
assessor_1
<\/span><\/h5> <\/td>
[cpr]<\/span><\/h5> <\/td> <\/tr>
assessor_2
<\/span><\/h5> <\/td>
[cpr]<\/span><\/h5> <\/td> <\/tr><\/tbody> <\/table> # create_html_table(text = c(\"CPR nummer\",\"Word\"), variable = c(\"[cpr][1]\", \"[cpr][2]\", \"[test]\"))"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/create_instrument_meta.html","id":null,"dir":"Reference","previous_headings":"","what":"DEPRICATED Create zips file with necessary content based on data set — create_instrument_meta","title":"DEPRICATED Create zips file with necessary content based on data set — create_instrument_meta","text":"Metadata can added editing data dictionary project initial design phase. want later add new instruments, function can used create () instrument(s) add project production.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/create_instrument_meta.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"DEPRICATED Create zips file with necessary content based on data set — create_instrument_meta","text":"","code":"create_instrument_meta(data, dir = here::here(\"\"), record.id = TRUE)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/create_instrument_meta.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"DEPRICATED Create zips file with necessary content based on data set — create_instrument_meta","text":"data metadata relevant instrument. `ds2dd_detailed()` dir destination dir instrument zip. Default current WD. record.id flag omit first row data dictionary assuming record_id field included instrument. Default TRUE.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/create_instrument_meta.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"DEPRICATED Create zips file with necessary content based on data set — create_instrument_meta","text":"list","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/create_instrument_meta.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"DEPRICATED Create zips file with necessary content based on data set — create_instrument_meta","text":"","code":"if (FALSE) { # \\dontrun{ data <- iris |> ds2dd_detailed( add.auto.id = TRUE, form.name = sample(c(\"b\", \"c\"), size = 6, replace = TRUE, prob = rep(.5, 2) ) ) |> purrr::pluck(\"meta\") # data |> create_instrument_meta() data <- iris |> ds2dd_detailed(add.auto.id = FALSE) |> purrr::pluck(\"data\") iris |> setNames(glue::glue(\"{sample(x = c('a','b'),size = length(ncol(iris)), replace=TRUE,prob = rep(x=.5,2))}__{names(iris)}\")) |> ds2dd_detailed(form.sep = \"__\") data |> purrr::pluck(\"meta\") |> create_instrument_meta(record.id = FALSE) } # }"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/d2w.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert single digits to words — d2w","title":"Convert single digits to words — d2w","text":"Convert single digits words","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/d2w.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert single digits to words — d2w","text":"","code":"d2w(x, lang = \"en\", neutrum = FALSE, everything = FALSE)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/d2w.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert single digits to words — d2w","text":"x data. Handle vectors, data.frames lists lang language. Danish (da) English (en), Default \"en\" neutrum numbers depending counted word everything flag also split numbers >9 single digits","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/d2w.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert single digits to words — d2w","text":"returns characters format input","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/d2w.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert single digits to words — d2w","text":"","code":"d2w(c(2:8, 21)) #> [1] \"two\" \"three\" \"four\" \"five\" \"six\" \"seven\" \"eight\" \"21\" d2w(data.frame(2:7, 3:8, 1), lang = \"da\", neutrum = TRUE) #> X2.7 X3.8 X1 #> 1 to tre et #> 2 tre fire et #> 3 fire fem et #> 4 fem seks et #> 5 seks syv et #> 6 syv otte et ## If everything=T, also larger numbers are reduced. ## Elements in the list are same length as input d2w(list(2:8, c(2, 6, 4, 23), 2), everything = TRUE) #> [[1]] #> [1] \"two\" \"three\" \"four\" \"five\" \"six\" \"seven\" \"eight\" #> #> [[2]] #> [1] \"two\" \"six\" \"four\" \"two three\" #> #> [[3]] #> [1] \"two\" #>"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/doc2dd.html","id":null,"dir":"Reference","previous_headings":"","what":"Doc table to data dictionary - EARLY, DOCS MISSING — doc2dd","title":"Doc table to data dictionary - EARLY, DOCS MISSING — doc2dd","text":"Works well `project.aid::docx2list()`. Allows defining database text document (see provided template) easier use data base creation. approach allows easier collaboration defining database. generic case data frame variable names values column. format like REDCap data dictionary, gives options formatting.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/doc2dd.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Doc table to data dictionary - EARLY, DOCS MISSING — doc2dd","text":"","code":"doc2dd( data, instrument.name, col.variables = 1, list.datetime.format = list(date_dmy = \"_dat[eo]$\", time_hh_mm_ss = \"_ti[md]e?$\"), col.description = NULL, col.condition = NULL, col.subheader = NULL, subheader.tag = \"h2\", condition.minor.sep = \",\", condition.major.sep = \";\", col.calculation = NULL, col.choices = NULL, choices.char.sep = \"/\", missing.default = NA )"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/doc2dd.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Doc table to data dictionary - EARLY, DOCS MISSING — doc2dd","text":"data tibble data.frame variable names one column instrument.name character vector length one. Instrument name. col.variables variable names column (default = 1), allows dplyr subsetting list.datetime.format formatting date/time detection. See `case_match_regex_list()` col.description descriptions column, allows dplyr subsetting. empty, variable names used. col.condition conditions branching column, allows dplyr subsetting. See `char2cond()`. col.subheader sub-header column, allows dplyr subsetting. See `format_subheader()`. subheader.tag formatting tag. Default \"h2\" condition.minor.sep condition split minor. See `char2cond()`. Default \",\". condition.major.sep condition split major. See `char2cond()`. Default \";\". col.calculation calculations column. written exact. Character vector. col.choices choices column. See `char2choice()`. choices.char.sep choices split. See `char2choice()`. Default \"/\". missing.default value missing fields. Default NA.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/doc2dd.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Doc table to data dictionary - EARLY, DOCS MISSING — doc2dd","text":"tibble data.frame (data)","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/doc2dd.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Doc table to data dictionary - EARLY, DOCS MISSING — doc2dd","text":"","code":"# data <- dd_inst # data |> doc2dd(instrument.name = \"evt\", # col.description = 3, # col.condition = 4, # col.subheader = 2, # col.calculation = 5, # col.choices = 6)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/ds2dd.html","id":null,"dir":"Reference","previous_headings":"","what":"(DEPRECATED) Data set to data dictionary function — ds2dd","title":"(DEPRECATED) Data set to data dictionary function — ds2dd","text":"Creates basic data dictionary skeleton. Please see `ds2dd_detailed()` advanced function.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/ds2dd.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"(DEPRECATED) Data set to data dictionary function — ds2dd","text":"","code":"ds2dd( ds, record.id = \"record_id\", form.name = \"basis\", field.type = \"text\", field.label = NULL, include.column.names = FALSE, metadata = REDCapCAST::redcap_meta_default() )"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/ds2dd.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"(DEPRECATED) Data set to data dictionary function — ds2dd","text":"ds data set record.id name column number id variable, moved first row data dictionary, character integer. Default \"record_id\". form.name vector form names, character string, length 1 length equal number variables. Default \"basis\". field.type vector field types, character string, length 1 length equal number variables. Default \"text. field.label vector form names, character string, length 1 length equal number variables. Default NULL identical field names. include.column.names Flag give detailed output including new column names original data set upload. metadata Metadata column names. Default included REDCapCAST::redcap_meta_default.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/ds2dd.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"(DEPRECATED) Data set to data dictionary function — ds2dd","text":"data.frame list data.frame vector","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/ds2dd.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"(DEPRECATED) Data set to data dictionary function — ds2dd","text":"Migrated stRoke ds2dd(). Fits better functionality 'REDCapCAST'.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/ds2dd.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"(DEPRECATED) Data set to data dictionary function — ds2dd","text":"","code":"redcapcast_data$record_id <- seq_len(nrow(redcapcast_data)) ds2dd(redcapcast_data, include.column.names=TRUE) #> $DataDictionary #> field_name form_name section_header field_type #> 1 record_id basis NA text #> 2 redcap_event_name basis NA text #> 3 redcap_repeat_instrument basis NA text #> 4 redcap_repeat_instance basis NA text #> 5 cpr basis NA text #> 6 inclusion basis NA text #> 7 inclusion_time basis NA text #> 8 dob basis NA text #> 9 age basis NA text #> 10 age_integer basis NA text #> 11 sex basis NA text #> 12 cohabitation basis NA text #> 13 hypertension basis NA text #> 14 diabetes basis NA text #> 15 region basis NA text #> 16 baseline_data_start_complete basis NA text #> 17 mrs_assessed basis NA text #> 18 mrs_date basis NA text #> 19 mrs_score basis NA text #> 20 mrs_complete basis NA text #> 21 con_mrs basis NA text #> 22 con_calc basis NA text #> 23 consensus_complete basis NA text #> 24 event_datetime basis NA text #> 25 event_age basis NA text #> 26 event_type basis NA text #> 27 new_event_complete basis NA text #> field_label select_choices_or_calculations field_note #> 1 record_id NA NA #> 2 redcap_event_name NA NA #> 3 redcap_repeat_instrument NA NA #> 4 redcap_repeat_instance NA NA #> 5 cpr NA NA #> 6 inclusion NA NA #> 7 inclusion_time NA NA #> 8 dob NA NA #> 9 age NA NA #> 10 age_integer NA NA #> 11 sex NA NA #> 12 cohabitation NA NA #> 13 hypertension NA NA #> 14 diabetes NA NA #> 15 region NA NA #> 16 baseline_data_start_complete NA NA #> 17 mrs_assessed NA NA #> 18 mrs_date NA NA #> 19 mrs_score NA NA #> 20 mrs_complete NA NA #> 21 con_mrs NA NA #> 22 con_calc NA NA #> 23 consensus_complete NA NA #> 24 event_datetime NA NA #> 25 event_age NA NA #> 26 event_type NA NA #> 27 new_event_complete NA NA #> text_validation_type_or_show_slider_number text_validation_min #> 1 NA NA #> 2 NA NA #> 3 NA NA #> 4 NA NA #> 5 NA NA #> 6 NA NA #> 7 NA NA #> 8 NA NA #> 9 NA NA #> 10 NA NA #> 11 NA NA #> 12 NA NA #> 13 NA NA #> 14 NA NA #> 15 NA NA #> 16 NA NA #> 17 NA NA #> 18 NA NA #> 19 NA NA #> 20 NA NA #> 21 NA NA #> 22 NA NA #> 23 NA NA #> 24 NA NA #> 25 NA NA #> 26 NA NA #> 27 NA NA #> text_validation_max identifier branching_logic required_field #> 1 NA NA NA NA #> 2 NA NA NA NA #> 3 NA NA NA NA #> 4 NA NA NA NA #> 5 NA NA NA NA #> 6 NA NA NA NA #> 7 NA NA NA NA #> 8 NA NA NA NA #> 9 NA NA NA NA #> 10 NA NA NA NA #> 11 NA NA NA NA #> 12 NA NA NA NA #> 13 NA NA NA NA #> 14 NA NA NA NA #> 15 NA NA NA NA #> 16 NA NA NA NA #> 17 NA NA NA NA #> 18 NA NA NA NA #> 19 NA NA NA NA #> 20 NA NA NA NA #> 21 NA NA NA NA #> 22 NA NA NA NA #> 23 NA NA NA NA #> 24 NA NA NA NA #> 25 NA NA NA NA #> 26 NA NA NA NA #> 27 NA NA NA NA #> custom_alignment question_number matrix_group_name matrix_ranking #> 1 NA NA NA NA #> 2 NA NA NA NA #> 3 NA NA NA NA #> 4 NA NA NA NA #> 5 NA NA NA NA #> 6 NA NA NA NA #> 7 NA NA NA NA #> 8 NA NA NA NA #> 9 NA NA NA NA #> 10 NA NA NA NA #> 11 NA NA NA NA #> 12 NA NA NA NA #> 13 NA NA NA NA #> 14 NA NA NA NA #> 15 NA NA NA NA #> 16 NA NA NA NA #> 17 NA NA NA NA #> 18 NA NA NA NA #> 19 NA NA NA NA #> 20 NA NA NA NA #> 21 NA NA NA NA #> 22 NA NA NA NA #> 23 NA NA NA NA #> 24 NA NA NA NA #> 25 NA NA NA NA #> 26 NA NA NA NA #> 27 NA NA NA NA #> field_annotation #> 1 NA #> 2 NA #> 3 NA #> 4 NA #> 5 NA #> 6 NA #> 7 NA #> 8 NA #> 9 NA #> 10 NA #> 11 NA #> 12 NA #> 13 NA #> 14 NA #> 15 NA #> 16 NA #> 17 NA #> 18 NA #> 19 NA #> 20 NA #> 21 NA #> 22 NA #> 23 NA #> 24 NA #> 25 NA #> 26 NA #> 27 NA #> #> $`Column names` #> [1] \"record_id\" \"redcap_event_name\" #> [3] \"redcap_repeat_instrument\" \"redcap_repeat_instance\" #> [5] \"cpr\" \"inclusion\" #> [7] \"inclusion_time\" \"dob\" #> [9] \"age\" \"age_integer\" #> [11] \"sex\" \"cohabitation\" #> [13] \"hypertension\" \"diabetes\" #> [15] \"region\" \"baseline_data_start_complete\" #> [17] \"mrs_assessed\" \"mrs_date\" #> [19] \"mrs_score\" \"mrs_complete\" #> [21] \"con_mrs\" \"con_calc\" #> [23] \"consensus_complete\" \"event_datetime\" #> [25] \"event_age\" \"event_type\" #> [27] \"new_event_complete\" #>"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/ds2dd_detailed.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract data from stata file for data dictionary — ds2dd_detailed","title":"Extract data from stata file for data dictionary — ds2dd_detailed","text":"Extract data stata file data dictionary","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/ds2dd_detailed.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract data from stata file for data dictionary — ds2dd_detailed","text":"","code":"ds2dd_detailed( data, add.auto.id = FALSE, date.format = \"dmy\", form.name = NULL, form.sep = NULL, form.prefix = TRUE, field.type = NULL, field.label = NULL, field.label.attr = \"label\", field.validation = NULL, metadata = REDCapCAST::redcap_meta_default(), convert.logicals = TRUE )"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/ds2dd_detailed.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract data from stata file for data dictionary — ds2dd_detailed","text":"data data frame add.auto.id flag add id column date.format date format, character string. ymd/dmy/mdy. dafault dmy. form.name manually specify form name(s). Vector length 1 ncol(data). Default NULL \"data\" used. form.sep supplied dataset form names suffix prefix column/variable names, seperator can specified. supplied, form.name ignored. Default NULL. form.prefix Flag set form prefix (TRUE) suffix (FALSE) column names. Assumes columns pre- suffix specified. field.type manually specify field type(s). Vector length 1 ncol(data). Default NULL \"text\" used everything factors, wil get \"radio\". field.label manually specify field label(s). Vector length 1 ncol(data). Default NULL colnames(data) used attribute `field.label.attr` haven_labelled data set (imported .dta file `haven::read_dta()`). field.label.attr attribute name named labels haven_labelled data set (imported .dta file `haven::read_dta()`. Default \"label\" field.validation manually specify field validation(s). Vector length 1 ncol(data). Default NULL `levels()` used factors attribute `factor.labels.attr` haven_labelled data set (imported .dta file `haven::read_dta()`). metadata redcap metadata headings. Default REDCapCAST::redcap_meta_default(). convert.logicals convert logicals factor. Default TRUE.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/ds2dd_detailed.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract data from stata file for data dictionary — ds2dd_detailed","text":"list length 2","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/ds2dd_detailed.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract data from stata file for data dictionary — ds2dd_detailed","text":"function natural development ds2dd() function. assumes first column ID-column. checks. Please, always inspect data dictionary upload. Ensure, data set formatted much information possible. `field.type` can supplied","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/ds2dd_detailed.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract data from stata file for data dictionary — ds2dd_detailed","text":"","code":"## Basic parsing with default options requireNamespace(\"REDCapCAST\") redcapcast_data |> dplyr::select(-dplyr::starts_with(\"redcap_\")) |> ds2dd_detailed() #> $data #> # A tibble: 25 × 24 #> record_id cpr inclusion inclusion_time dob age age_integer sex #> #> 1 1 12034… 2023-03-13 12:38:49 1940-03-12 83.0 83 fema… #> 2 2 01023… 2023-03-01 10:38:57 1934-02-01 89.1 89 male #> 3 2 NA NA NA NA NA NA NA #> 4 2 NA NA NA NA NA NA NA #> 5 3 23015… 2022-03-08 12:01:07 1956-01-23 66.1 66 male #> 6 3 NA NA NA NA NA NA NA #> 7 3 NA NA NA NA NA NA NA #> 8 3 NA NA NA NA NA NA NA #> 9 3 NA NA NA NA NA NA NA #> 10 3 NA NA NA NA NA NA NA #> # ℹ 15 more rows #> # ℹ 16 more variables: cohabitation , hypertension , diabetes , #> # region , baseline_data_start_complete , mrs_assessed , #> # mrs_date , mrs_score , mrs_complete , con_mrs , #> # con_calc , consensus_complete , event_datetime , #> # event_age , event_type , new_event_complete #> #> $meta #> # A tibble: 24 × 18 #> field_name form_name section_header field_type field_label #> #> 1 record_id data NA text record_id #> 2 cpr data NA text cpr #> 3 inclusion data NA text inclusion #> 4 inclusion_time data NA text inclusion_time #> 5 dob data NA text dob #> 6 age data NA text age #> 7 age_integer data NA text age_integer #> 8 sex data NA text sex #> 9 cohabitation data NA text cohabitation #> 10 hypertension data NA text hypertension #> # ℹ 14 more rows #> # ℹ 13 more variables: select_choices_or_calculations , field_note , #> # text_validation_type_or_show_slider_number , #> # text_validation_min , text_validation_max , identifier , #> # branching_logic , required_field , custom_alignment , #> # question_number , matrix_group_name , matrix_ranking , #> # field_annotation #> #> attr(,\"class\") #> [1] \"REDCapCAST\" \"list\" ## Adding a record_id field iris |> ds2dd_detailed(add.auto.id = TRUE) #> $data #> # A tibble: 150 × 6 #> record_id sepal.length sepal.width petal.length petal.width species #> #> 1 1 5.1 3.5 1.4 0.2 setosa #> 2 2 4.9 3 1.4 0.2 setosa #> 3 3 4.7 3.2 1.3 0.2 setosa #> 4 4 4.6 3.1 1.5 0.2 setosa #> 5 5 5 3.6 1.4 0.2 setosa #> 6 6 5.4 3.9 1.7 0.4 setosa #> 7 7 4.6 3.4 1.4 0.3 setosa #> 8 8 5 3.4 1.5 0.2 setosa #> 9 9 4.4 2.9 1.4 0.2 setosa #> 10 10 4.9 3.1 1.5 0.1 setosa #> # ℹ 140 more rows #> #> $meta #> # A tibble: 6 × 18 #> field_name form_name section_header field_type field_label #> #> 1 record_id data NA text record_id #> 2 sepal.length data NA text Sepal.Length #> 3 sepal.width data NA text Sepal.Width #> 4 petal.length data NA text Petal.Length #> 5 petal.width data NA text Petal.Width #> 6 species data NA radio Species #> # ℹ 13 more variables: select_choices_or_calculations , field_note , #> # text_validation_type_or_show_slider_number , #> # text_validation_min , text_validation_max , identifier , #> # branching_logic , required_field , custom_alignment , #> # question_number , matrix_group_name , matrix_ranking , #> # field_annotation #> #> attr(,\"class\") #> [1] \"REDCapCAST\" \"list\" ## Passing form name information to function iris |> ds2dd_detailed( add.auto.id = TRUE, form.name = sample(c(\"b\", \"c\"), size = 6, replace = TRUE, prob = rep(.5, 2)) ) |> purrr::pluck(\"meta\") #> # A tibble: 6 × 18 #> field_name form_name section_header field_type field_label #> #> 1 record_id b NA text record_id #> 2 sepal.length c NA text Sepal.Length #> 3 sepal.width b NA text Sepal.Width #> 4 petal.length c NA text Petal.Length #> 5 petal.width b NA text Petal.Width #> 6 species c NA radio Species #> # ℹ 13 more variables: select_choices_or_calculations , field_note , #> # text_validation_type_or_show_slider_number , #> # text_validation_min , text_validation_max , identifier , #> # branching_logic , required_field , custom_alignment , #> # question_number , matrix_group_name , matrix_ranking , #> # field_annotation mtcars |> ds2dd_detailed(add.auto.id = TRUE) #> $data #> # A tibble: 32 × 12 #> record_id mpg cyl disp hp drat wt qsec vs am gear carb #> #> 1 1 21 6 160 110 3.9 2.62 16.5 0 1 4 4 #> 2 2 21 6 160 110 3.9 2.88 17.0 0 1 4 4 #> 3 3 22.8 4 108 93 3.85 2.32 18.6 1 1 4 1 #> 4 4 21.4 6 258 110 3.08 3.22 19.4 1 0 3 1 #> 5 5 18.7 8 360 175 3.15 3.44 17.0 0 0 3 2 #> 6 6 18.1 6 225 105 2.76 3.46 20.2 1 0 3 1 #> 7 7 14.3 8 360 245 3.21 3.57 15.8 0 0 3 4 #> 8 8 24.4 4 147. 62 3.69 3.19 20 1 0 4 2 #> 9 9 22.8 4 141. 95 3.92 3.15 22.9 1 0 4 2 #> 10 10 19.2 6 168. 123 3.92 3.44 18.3 1 0 4 4 #> # ℹ 22 more rows #> #> $meta #> # A tibble: 12 × 18 #> field_name form_name section_header field_type field_label #> #> 1 record_id data NA text record_id #> 2 mpg data NA text mpg #> 3 cyl data NA text cyl #> 4 disp data NA text disp #> 5 hp data NA text hp #> 6 drat data NA text drat #> 7 wt data NA text wt #> 8 qsec data NA text qsec #> 9 vs data NA text vs #> 10 am data NA text am #> 11 gear data NA text gear #> 12 carb data NA text carb #> # ℹ 13 more variables: select_choices_or_calculations , field_note , #> # text_validation_type_or_show_slider_number , #> # text_validation_min , text_validation_max , identifier , #> # branching_logic , required_field , custom_alignment , #> # question_number , matrix_group_name , matrix_ranking , #> # field_annotation #> #> attr(,\"class\") #> [1] \"REDCapCAST\" \"list\" ## Using column name suffix to carry form name data <- iris |> ds2dd_detailed(add.auto.id = TRUE) |> purrr::pluck(\"data\") names(data) <- glue::glue(\"{sample(x = c('a','b'),size = length(names(data)), replace=TRUE,prob = rep(x=.5,2))}__{names(data)}\") data |> ds2dd_detailed(form.sep = \"__\") #> $data #> # A tibble: 150 × 6 #> record_id sepal.length sepal.width petal.length petal.width species #> #> 1 1 5.1 3.5 1.4 0.2 setosa #> 2 2 4.9 3 1.4 0.2 setosa #> 3 3 4.7 3.2 1.3 0.2 setosa #> 4 4 4.6 3.1 1.5 0.2 setosa #> 5 5 5 3.6 1.4 0.2 setosa #> 6 6 5.4 3.9 1.7 0.4 setosa #> 7 7 4.6 3.4 1.4 0.3 setosa #> 8 8 5 3.4 1.5 0.2 setosa #> 9 9 4.4 2.9 1.4 0.2 setosa #> 10 10 4.9 3.1 1.5 0.1 setosa #> # ℹ 140 more rows #> #> $meta #> # A tibble: 6 × 18 #> field_name form_name section_header field_type field_label #> #> 1 record_id b NA text record_id #> 2 sepal.length a NA text sepal.length #> 3 sepal.width b NA text sepal.width #> 4 petal.length a NA text petal.length #> 5 petal.width b NA text petal.width #> 6 species a NA radio species #> # ℹ 13 more variables: select_choices_or_calculations , field_note , #> # text_validation_type_or_show_slider_number , #> # text_validation_min , text_validation_max , identifier , #> # branching_logic , required_field , custom_alignment , #> # question_number , matrix_group_name , matrix_ranking , #> # field_annotation #> #> attr(,\"class\") #> [1] \"REDCapCAST\" \"list\""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/easy_redcap.html","id":null,"dir":"Reference","previous_headings":"","what":"Secure API key storage and data acquisition in one — easy_redcap","title":"Secure API key storage and data acquisition in one — easy_redcap","text":"Secure API key storage data acquisition one","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/easy_redcap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Secure API key storage and data acquisition in one — easy_redcap","text":"","code":"easy_redcap(project.name, widen.data = TRUE, uri, ...)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/easy_redcap.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Secure API key storage and data acquisition in one — easy_redcap","text":"project.name name current project (key storage `keyring::key_set()`, using default keyring) widen.data argument widen exported data uri REDCap database API uri ... arguments passed `REDCapCAST::read_redcap_tables()`","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/easy_redcap.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Secure API key storage and data acquisition in one — easy_redcap","text":"data.frame list depending widen.data","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/export_redcap_instrument.html","id":null,"dir":"Reference","previous_headings":"","what":"Creates zip-file with necessary content to manually add instrument to database — export_redcap_instrument","title":"Creates zip-file with necessary content to manually add instrument to database — export_redcap_instrument","text":"Metadata can added editing data dictionary project initial design phase. want later add new instruments, function can used create () instrument(s) add project production.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/export_redcap_instrument.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creates zip-file with necessary content to manually add instrument to database — export_redcap_instrument","text":"","code":"export_redcap_instrument(data, file, force = FALSE, record.id = \"record_id\")"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/export_redcap_instrument.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creates zip-file with necessary content to manually add instrument to database — export_redcap_instrument","text":"data metadata relevant instrument. `ds2dd_detailed()` file destination file name. force force instrument creation ignore different form names just using first. record.id record id variable name. Default 'record_id'.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/export_redcap_instrument.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creates zip-file with necessary content to manually add instrument to database — export_redcap_instrument","text":"exports zip-file","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/export_redcap_instrument.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Creates zip-file with necessary content to manually add instrument to database — export_redcap_instrument","text":"","code":"# iris |> # ds2dd_detailed( # add.auto.id = TRUE, # form.name = sample(c(\"b\", \"c\"), size = 6, replace = TRUE, prob = rep(.5, 2)) # ) |> # purrr::pluck(\"meta\") |> # (\\(.x){ # split(.x, .x$form_name) # })() |> # purrr::imap(function(.x, .i){ # export_redcap_instrument(.x,file=here::here(paste0(.i,Sys.Date(),\".zip\"))) # }) # iris |> # ds2dd_detailed( # add.auto.id = TRUE # ) |> # purrr::pluck(\"meta\") |> # export_redcap_instrument(file=here::here(paste0(\"instrument\",Sys.Date(),\".zip\")))"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/fct2num.html","id":null,"dir":"Reference","previous_headings":"","what":"Allows conversion of factor to numeric values preserving original levels — fct2num","title":"Allows conversion of factor to numeric values preserving original levels — fct2num","text":"Allows conversion factor numeric values preserving original levels","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/fct2num.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Allows conversion of factor to numeric values preserving original levels — fct2num","text":"","code":"fct2num(data)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/fct2num.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Allows conversion of factor to numeric values preserving original levels — fct2num","text":"data vector","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/fct2num.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Allows conversion of factor to numeric values preserving original levels — fct2num","text":"numeric vector","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/fct2num.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Allows conversion of factor to numeric values preserving original levels — fct2num","text":"","code":"c(1, 4, 3, \"A\", 7, 8, 1) |> as_factor() |> fct2num() #> Warning: invalid roman numeral: A #> [1] 1 2 3 4 5 6 1 structure(c(1, 2, 3, 2, 10, 9), labels = c(Unknown = 9, Refused = 10), class = \"haven_labelled\" ) |> as_factor() |> fct2num() #> [1] 1 2 3 2 10 9 structure(c(1, 2, 3, 2, 10, 9), labels = c(Unknown = 9, Refused = 10), class = \"labelled\" ) |> as_factor() |> fct2num() #> [1] 1 2 3 2 10 9 # Outlier with labels, but no class of origin, handled like numeric vector # structure(c(1, 2, 3, 2, 10, 9), # labels = c(Unknown = 9, Refused = 10) # ) |> # as_factor() |> # fct2num() v <- sample(6:19, 20, TRUE) |> factor() dput(v) #> structure(c(7L, 1L, 10L, 3L, 10L, 10L, 9L, 8L, 3L, 2L, 6L, 8L, #> 3L, 5L, 4L, 8L, 1L, 6L, 5L, 5L), levels = c(\"6\", \"7\", \"8\", \"9\", #> \"11\", \"12\", \"13\", \"15\", \"16\", \"17\"), class = \"factor\") named_levels(v) #> 13 6 17 8 16 15 7 12 11 9 #> 7 1 10 3 9 8 2 6 5 4 fct2num(v) #> [1] 13 6 17 8 17 17 16 15 8 7 12 15 8 11 9 15 6 12 11 11"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/file_extension.html","id":null,"dir":"Reference","previous_headings":"","what":"DEPRECATED Helper to import files correctly — file_extension","title":"DEPRECATED Helper to import files correctly — file_extension","text":"DEPRECATED Helper import files correctly","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/file_extension.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"DEPRECATED Helper to import files correctly — file_extension","text":"","code":"file_extension(filenames)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/file_extension.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"DEPRECATED Helper to import files correctly — file_extension","text":"filenames file names","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/file_extension.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"DEPRECATED Helper to import files correctly — file_extension","text":"character vector","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/file_extension.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"DEPRECATED Helper to import files correctly — file_extension","text":"","code":"file_extension(list.files(here::here(\"\"))[[2]])[[1]] #> [1] \"\" file_extension(c(\"file.cd..ks\", \"file\")) #> [1] \"ks\" \"\""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/focused_metadata.html","id":null,"dir":"Reference","previous_headings":"","what":"focused_metadata — focused_metadata","title":"focused_metadata — focused_metadata","text":"Extracts limited metadata variables dataset","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/focused_metadata.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"focused_metadata — focused_metadata","text":"","code":"focused_metadata(metadata, vars_in_data)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/focused_metadata.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"focused_metadata — focused_metadata","text":"metadata dataframe containing metadata vars_in_data Vector variable names dataset","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/focused_metadata.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"focused_metadata — focused_metadata","text":"dataframe containing metadata variables dataset","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/format_subheader.html","id":null,"dir":"Reference","previous_headings":"","what":"Sub-header formatting wrapper — format_subheader","title":"Sub-header formatting wrapper — format_subheader","text":"Sub-header formatting wrapper","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/format_subheader.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sub-header formatting wrapper — format_subheader","text":"","code":"format_subheader(data, tag = \"h2\")"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/format_subheader.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sub-header formatting wrapper — format_subheader","text":"data character vector tag character vector length 1","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/format_subheader.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sub-header formatting wrapper — format_subheader","text":"character vector","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/format_subheader.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sub-header formatting wrapper — format_subheader","text":"","code":"\"Instrument header\" |> format_subheader() #>

Instrument header<\/h2><\/div>"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/get_api_key.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieve project API key if stored, if not, set and retrieve — get_api_key","title":"Retrieve project API key if stored, if not, set and retrieve — get_api_key","text":"Retrieve project API key stored, , set retrieve","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/get_api_key.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieve project API key if stored, if not, set and retrieve — get_api_key","text":"","code":"get_api_key(key.name)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/get_api_key.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieve project API key if stored, if not, set and retrieve — get_api_key","text":"key.name character vector key name","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/get_api_key.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieve project API key if stored, if not, set and retrieve — get_api_key","text":"character vector","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/get_attr.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract attribute. Returns NA if none — get_attr","title":"Extract attribute. Returns NA if none — get_attr","text":"Extract attribute. Returns NA none","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/get_attr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract attribute. Returns NA if none — get_attr","text":"","code":"get_attr(data, attr = NULL)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/get_attr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract attribute. Returns NA if none — get_attr","text":"data vector attr attribute name","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/get_attr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract attribute. Returns NA if none — get_attr","text":"character vector","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/get_attr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract attribute. Returns NA if none — get_attr","text":"","code":"attr(mtcars$mpg, \"label\") <- \"testing\" do.call(c, sapply(mtcars, get_attr)) #> $mpg.label #> [1] \"testing\" #> if (FALSE) { # \\dontrun{ mtcars |> numchar2fct(numeric.threshold = 6) |> ds2dd_detailed() } # }"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/get_id_name.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the id name — get_id_name","title":"Get the id name — get_id_name","text":"Get id name","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/get_id_name.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the id name — get_id_name","text":"","code":"get_id_name(data)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/get_id_name.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the id name — get_id_name","text":"data data frame list","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/get_id_name.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the id name — get_id_name","text":"character vector","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/guess_time_only.html","id":null,"dir":"Reference","previous_headings":"","what":"Guess time variables based on naming pattern — guess_time_only","title":"Guess time variables based on naming pattern — guess_time_only","text":"repairing data time variables appended \"1970-01-01\"","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/guess_time_only.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Guess time variables based on naming pattern — guess_time_only","text":"","code":"guess_time_only( data, validate.time = FALSE, time.var.sel.pos = \"[Tt]i[d(me)]\", time.var.sel.neg = \"[Dd]at[eo]\" )"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/guess_time_only.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Guess time variables based on naming pattern — guess_time_only","text":"data data.frame tibble validate.time Flag validate guessed time columns time.var.sel.pos Positive selection regex string passed `gues_time_only_filter()` sel.pos. time.var.sel.neg Negative selection regex string passed `gues_time_only_filter()` sel.neg.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/guess_time_only.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Guess time variables based on naming pattern — guess_time_only","text":"data.frame tibble","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/guess_time_only.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Guess time variables based on naming pattern — guess_time_only","text":"","code":"redcapcast_data |> guess_time_only(validate.time = TRUE) #> $is.POSIX #> # A tibble: 25 × 2 #> inclusion_time event_datetime #>