From 1e38e70d161d5914a63e0d5f8faf458fdca17821 Mon Sep 17 00:00:00 2001 From: agdamsbo <43278243+agdamsbo@users.noreply.github.com> Date: Tue, 4 Jul 2023 14:05:51 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20agdamsbo?= =?UTF-8?q?/REDCapCAST@8bd4d9ade7fa180790ad9f261ca9fd56cd2fcd7f=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 404.html | 2 +- LICENSE.html | 2 +- articles/Introduction.html | 214 ++++++++-------- articles/index.html | 2 +- authors.html | 2 +- index.html | 2 +- news/index.html | 12 +- pkgdown.yml | 2 +- reference/REDCap_split.html | 2 +- reference/clean_redcap_name.html | 2 +- reference/d2w.html | 135 +++++++++++ reference/ds2dd.html | 296 +++++++++++++++++++++++ reference/focused_metadata.html | 2 +- reference/index.html | 17 +- reference/match_fields_to_form.html | 2 +- reference/read_redcap_tables.html | 2 +- reference/redcap_wider.html | 2 +- reference/redcapcast_data.html | 2 +- reference/redcapcast_meta.html | 2 +- reference/sanitize_split.html | 2 +- reference/split_non_repeating_forms.html | 2 +- reference/strsplitx.html | 132 ++++++++++ search.json | 2 +- sitemap.xml | 9 + 24 files changed, 723 insertions(+), 126 deletions(-) create mode 100644 reference/d2w.html create mode 100644 reference/ds2dd.html create mode 100644 reference/strsplitx.html diff --git a/404.html b/404.html index 8b92cbf..be78168 100644 --- a/404.html +++ b/404.html @@ -31,7 +31,7 @@ REDCapCAST - 23.6.1 + 23.6.2 + + + + + +
+
+
+ +
+

Convert single digits to words

+
+ +
+

Usage

+
d2w(x, lang = "en", neutrum = FALSE, everything = FALSE)
+
+ +
+

Arguments

+
x
+

data. Handle vectors, data.frames and lists

+ + +
lang
+

language. Danish (da) and English (en), Default is "en"

+ + +
neutrum
+

for numbers depending on counted word

+ + +
everything
+

flag to also split numbers >9 to single digits

+ +
+
+

Value

+ + +

returns characters in same format as input

+
+ +
+

Examples

+
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"
+#> 
+
+
+
+
+ + +
+ + + + + + + diff --git a/reference/ds2dd.html b/reference/ds2dd.html new file mode 100644 index 0000000..8acb4dd --- /dev/null +++ b/reference/ds2dd.html @@ -0,0 +1,296 @@ + +Data set to data dictionary function — ds2dd • REDCapCAST + Skip to contents + + +
+
+
+ +
+

Migrated from stRoke ds2dd(). Fits better with the functionality of +'REDCapCAST'

+
+ +
+

Usage

+
ds2dd(
+  ds,
+  record.id = "record_id",
+  form.name = "basis",
+  field.type = "text",
+  field.label = NULL,
+  include.column.names = FALSE,
+  metadata = names(redcapcast_meta)
+)
+
+ +
+

Arguments

+
ds
+

data set

+ + +
record.id
+

name or column number of id variable, moved to first row of +data dictionary, character of integer. Default is "record_id".

+ + +
form.name
+

vector of form names, character string, length 1 or length +equal to number of variables. Default is "basis".

+ + +
field.type
+

vector of field types, character string, length 1 or length +equal to number of variables. Default is "text.

+ + +
field.label
+

vector of form names, character string, length 1 or length +equal to number of variables. Default is NULL and is then identical to field +names.

+ + +
include.column.names
+

Flag to give detailed output including new +column names for original data set for upload.

+ + +
metadata
+

Metadata column names. Default is the included +REDCapCAST::redcapcast_data.

+ +
+
+

Value

+ + +

data.frame or list of data.frame and vector

+
+ +
+

Examples

+
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                           dob     basis             NA       text
+#> 8                           age     basis             NA       text
+#> 9                   age_integer     basis             NA       text
+#> 10                          sex     basis             NA       text
+#> 11                 cohabitation     basis             NA       text
+#> 12                 hypertension     basis             NA       text
+#> 13                     diabetes     basis             NA       text
+#> 14                       region     basis             NA       text
+#> 15 baseline_data_start_complete     basis             NA       text
+#> 16                 mrs_assessed     basis             NA       text
+#> 17                     mrs_date     basis             NA       text
+#> 18                    mrs_score     basis             NA       text
+#> 19                 mrs_complete     basis             NA       text
+#> 20                   event_date     basis             NA       text
+#> 21                   event_type     basis             NA       text
+#> 22           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                           dob                             NA         NA
+#> 8                           age                             NA         NA
+#> 9                   age_integer                             NA         NA
+#> 10                          sex                             NA         NA
+#> 11                 cohabitation                             NA         NA
+#> 12                 hypertension                             NA         NA
+#> 13                     diabetes                             NA         NA
+#> 14                       region                             NA         NA
+#> 15 baseline_data_start_complete                             NA         NA
+#> 16                 mrs_assessed                             NA         NA
+#> 17                     mrs_date                             NA         NA
+#> 18                    mrs_score                             NA         NA
+#> 19                 mrs_complete                             NA         NA
+#> 20                   event_date                             NA         NA
+#> 21                   event_type                             NA         NA
+#> 22           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
+#>    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
+#>    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
+#>    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
+#> 
+#> $`Column names`
+#>  [1] "record_id"                    "redcap_event_name"           
+#>  [3] "redcap_repeat_instrument"     "redcap_repeat_instance"      
+#>  [5] "cpr"                          "inclusion"                   
+#>  [7] "dob"                          "age"                         
+#>  [9] "age_integer"                  "sex"                         
+#> [11] "cohabitation"                 "hypertension"                
+#> [13] "diabetes"                     "region"                      
+#> [15] "baseline_data_start_complete" "mrs_assessed"                
+#> [17] "mrs_date"                     "mrs_score"                   
+#> [19] "mrs_complete"                 "event_date"                  
+#> [21] "event_type"                   "new_event_complete"          
+#> 
+
+
+
+ + +
+ + + + + + + diff --git a/reference/focused_metadata.html b/reference/focused_metadata.html index ea25d55..31acab8 100644 --- a/reference/focused_metadata.html +++ b/reference/focused_metadata.html @@ -10,7 +10,7 @@ REDCapCAST - 23.6.1 + 23.6.2 + + + + + +
+
+
+ +
+

Can be used as a substitute of the base function. Main claim to fame is +easing the split around the defined delimiter, see example.

+
+ +
+

Usage

+
strsplitx(x, split, type = "classic", perl = FALSE, ...)
+
+ +
+

Arguments

+
x
+

data

+ + +
split
+

delimiter

+ + +
type
+

Split type. Can be c("classic", "before", "after", "around")

+ + +
perl
+

perl param from strsplit()

+ + +
...
+

additional parameters are passed to base strsplit handling splits

+ +
+
+

Value

+ + +

list

+
+ +
+

Examples

+
test <- c("12 months follow-up", "3 steps", "mRS 6 weeks", "Counting to 231 now")
+strsplitx(test,"[0-9]",type="around")
+#> [[1]]
+#> [1] "1"                 "2"                 " months follow-up"
+#> 
+#> [[2]]
+#> [1] "3"      " steps"
+#> 
+#> [[3]]
+#> [1] "mRS "   "6"      " weeks"
+#> 
+#> [[4]]
+#> [1] "Counting to " "2"            "3"            "1"            " now"        
+#> 
+
+
+
+ + +
+ + + + + + + diff --git a/search.json b/search.json index 6281eaf..6b58944 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"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/Introduction.html","id":"splitting-the-dataset","dir":"Articles","previous_headings":"","what":"Splitting the dataset","title":"Introduction","text":"","code":"redcapcast_data |> gt::gt() redcapcast_meta |> gt::gt() list <- REDCap_split(records = redcapcast_data, metadata = redcapcast_meta, forms = \"repeating\") str(list) #> List of 2 #> $ :'data.frame': 9 obs. of 17 variables: #> ..$ record_id : num [1:9] 1 2 2 3 3 3 4 4 5 #> ..$ redcap_event_name : chr [1:9] \"inclusion\" \"inclusion\" \"follow1\" \"inclusion\" ... #> ..$ cpr : chr [1:9] \"1203401OB4\" \"0102342303\" NA \"2301569823\" ... #> ..$ inclusion : Date[1:9], format: \"2023-03-13\" \"2023-03-01\" ... #> ..$ dob : Date[1:9], format: \"1940-03-12\" \"1934-02-01\" ... #> ..$ age : num [1:9] 83 89.1 NA 66.1 NA ... #> ..$ age_integer : num [1:9] 83 89 NA 66 NA NA 117 NA 126 #> ..$ sex : chr [1:9] \"female\" \"male\" NA \"male\" ... #> ..$ cohabitation : chr [1:9] \"Yes\" \"Yes\" NA \"No\" ... #> ..$ hypertension : chr [1:9] \"No\" \"No\" NA \"Yes\" ... #> ..$ diabetes : chr [1:9] \"Yes\" \"No\" NA \"Yes\" ... #> ..$ region : chr [1:9] \"East\" \"South\" NA \"North\" ... #> ..$ baseline_data_start_complete: chr [1:9] \"Incomplete\" \"Incomplete\" NA \"Incomplete\" ... #> ..$ mrs_assessed : chr [1:9] \"Yes\" \"Yes\" \"Yes\" NA ... #> ..$ mrs_date : Date[1:9], format: \"2023-03-13\" \"2023-03-07\" ... #> ..$ mrs_score : num [1:9] 1 1 3 NA 2 1 NA NA NA #> ..$ mrs_complete : chr [1:9] \"Incomplete\" \"Incomplete\" \"Incomplete\" \"Incomplete\" ... #> $ new_event:'data.frame': 9 obs. of 7 variables: #> ..$ record_id : num [1:9] 2 3 3 3 3 3 4 4 4 #> ..$ redcap_event_name : chr [1:9] \"follow1\" \"follow1\" \"follow1\" \"follow2\" ... #> ..$ redcap_repeat_instrument: chr [1:9] \"new_event\" \"new_event\" \"new_event\" \"new_event\" ... #> ..$ redcap_repeat_instance : num [1:9] 1 1 2 1 2 3 1 2 3 #> ..$ event_date : Date[1:9], format: \"2023-03-13\" \"2022-11-08\" ... #> ..$ event_type : chr [1:9] \"TIA\" \"AIS\" \"ICH\" \"ICH\" ... #> ..$ new_event_complete : chr [1:9] \"Incomplete\" \"Incomplete\" \"Incomplete\" \"Incomplete\" ... list <- REDCap_split(records = redcapcast_data, metadata = redcapcast_meta, forms = \"all\") str(list) #> List of 3 #> $ baseline_data_start:'data.frame': 9 obs. of 13 variables: #> ..$ record_id : num [1:9] 1 2 2 3 3 3 4 4 5 #> ..$ redcap_event_name : chr [1:9] \"inclusion\" \"inclusion\" \"follow1\" \"inclusion\" ... #> ..$ cpr : chr [1:9] \"1203401OB4\" \"0102342303\" NA \"2301569823\" ... #> ..$ inclusion : Date[1:9], format: \"2023-03-13\" \"2023-03-01\" ... #> ..$ dob : Date[1:9], format: \"1940-03-12\" \"1934-02-01\" ... #> ..$ age : num [1:9] 83 89.1 NA 66.1 NA ... #> ..$ age_integer : num [1:9] 83 89 NA 66 NA NA 117 NA 126 #> ..$ sex : chr [1:9] \"female\" \"male\" NA \"male\" ... #> ..$ cohabitation : chr [1:9] \"Yes\" \"Yes\" NA \"No\" ... #> ..$ hypertension : chr [1:9] \"No\" \"No\" NA \"Yes\" ... #> ..$ diabetes : chr [1:9] \"Yes\" \"No\" NA \"Yes\" ... #> ..$ region : chr [1:9] \"East\" \"South\" NA \"North\" ... #> ..$ baseline_data_start_complete: chr [1:9] \"Incomplete\" \"Incomplete\" NA \"Incomplete\" ... #> $ mrs :'data.frame': 9 obs. of 6 variables: #> ..$ record_id : num [1:9] 1 2 2 3 3 3 4 4 5 #> ..$ redcap_event_name: chr [1:9] \"inclusion\" \"inclusion\" \"follow1\" \"inclusion\" ... #> ..$ mrs_assessed : chr [1:9] \"Yes\" \"Yes\" \"Yes\" NA ... #> ..$ mrs_date : Date[1:9], format: \"2023-03-13\" \"2023-03-07\" ... #> ..$ mrs_score : num [1:9] 1 1 3 NA 2 1 NA NA NA #> ..$ mrs_complete : chr [1:9] \"Incomplete\" \"Incomplete\" \"Incomplete\" \"Incomplete\" ... #> $ new_event :'data.frame': 9 obs. of 7 variables: #> ..$ record_id : num [1:9] 2 3 3 3 3 3 4 4 4 #> ..$ redcap_event_name : chr [1:9] \"follow1\" \"follow1\" \"follow1\" \"follow2\" ... #> ..$ redcap_repeat_instrument: chr [1:9] \"new_event\" \"new_event\" \"new_event\" \"new_event\" ... #> ..$ redcap_repeat_instance : num [1:9] 1 1 2 1 2 3 1 2 3 #> ..$ event_date : Date[1:9], format: \"2023-03-13\" \"2022-11-08\" ... #> ..$ event_type : chr [1:9] \"TIA\" \"AIS\" \"ICH\" \"ICH\" ... #> ..$ new_event_complete : chr [1:9] \"Incomplete\" \"Incomplete\" \"Incomplete\" \"Incomplete\" ..."},{"path":"https://agdamsbo.github.io/REDCapCAST/articles/Introduction.html","id":"reading-data-from-redcap","dir":"Articles","previous_headings":"","what":"Reading data from REDCap","title":"Introduction","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/Introduction.html","id":"pivotting-to-wider-format","dir":"Articles","previous_headings":"","what":"Pivotting to wider format","title":"Introduction","text":"","code":"# redcap_wider(ds)"},{"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 (2023). REDCapCAST: REDCap Castellated Data Handling. https://github.com/agdamsbo/REDCapCAST, https://agdamsbo.github.io/REDCapCAST/.","code":"@Manual{, title = {REDCapCAST: REDCap Castellated Data Handling}, author = {Andreas Gammelgaard Damsbo and Paul Egeler}, year = {2023}, note = {https://github.com/agdamsbo/REDCapCAST, https://agdamsbo.github.io/REDCapCAST/}, }"},{"path":"https://agdamsbo.github.io/REDCapCAST/index.html","id":"redcapcast-package-","dir":"","previous_headings":"","what":"REDCap Castellated Data Handling","title":"REDCap Castellated Data Handling","text":"REDCap Castellated data handling using repeated instruments. package fork SpectrumHealthResearch/REDCapRITS. REDCapRITS represents great extensive work handle castellated REDCap data different programming languages. fork purely minded R usage includes implementations main REDCap_split function. main goal project allow “minimal data” approach allowing filter records, instruments variables export download data needed. think approach desireable handling sensitive, clinical data. similar functionality available similar tools (like REDCapR REDCapTidieR). Please refer REDCap-Tools great tools.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/index.html","id":"use-and-immprovements","dir":"","previous_headings":"","what":"Use and immprovements","title":"REDCap Castellated Data Handling","text":"package primarily relevant working longitudinal projects /projects using repeated instruments. just short descirption main functions: REDcap_split(): Works largely original REDCapRITS::REDCap_split(). takes REDCap dataset metadata (data dictionary) split data set list dataframes instruments. read_redcap_tables(): wraps use REDCapR::redcap_read() REDCap_split() ease export REDCap data. redcap_wider(): pivots data frame repeated instruments wide format utilizing tidyr::pivot_wider() tidyverse. Compared original REDCapRITS, matching functions improved accept column naming REDCap data manual download API export.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/index.html","id":"future","dir":"","previous_headings":"","what":"Future","title":"REDCap Castellated Data Handling","text":"plan package bundled Handbook working REDCap R. plan also include functionality assist casting (yes, pun intended) initial REDCap database.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"REDCap Castellated Data Handling","text":"Install latest version directly GitHub:","code":"remotes::install_github(\"agdamsbo/REDCapCAST\")"},{"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) { # 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/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/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/match_fields_to_form.html","id":null,"dir":"Reference","previous_headings":"","what":"Match fields to forms — match_fields_to_form","title":"Match fields to forms — match_fields_to_form","text":"Match fields forms","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/match_fields_to_form.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Match fields to forms — match_fields_to_form","text":"","code":"match_fields_to_form(metadata, vars_in_data)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/match_fields_to_form.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Match fields to forms — match_fields_to_form","text":"metadata data frame containing field names form names vars_in_data character vector variable names","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/match_fields_to_form.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Match fields to forms — match_fields_to_form","text":"data frame containing field names form names","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/read_redcap_tables.html","id":null,"dir":"Reference","previous_headings":"","what":"Download REDCap data — read_redcap_tables","title":"Download REDCap data — read_redcap_tables","text":"Implementation REDCap_split focused data acquisition approach using REDCapR::redcap_read nad downloading specified fields, forms /events using built-focused_metadata including clean-. Works longitudinal projects repeating instruments.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/read_redcap_tables.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download REDCap data — read_redcap_tables","text":"","code":"read_redcap_tables( uri, token, records = NULL, fields = NULL, events = NULL, forms = NULL, raw_or_label = \"label\", split_forms = \"all\", generics = c(\"record_id\", \"redcap_event_name\", \"redcap_repeat_instrument\", \"redcap_repeat_instance\") )"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/read_redcap_tables.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download REDCap data — read_redcap_tables","text":"uri REDCap database uri token API token records records download fields fields download events events download forms forms download raw_or_label raw label tags split_forms Whether split \"repeating\" \"\" forms, default . generics vector auto-generated generic variable names ignore discarding empty rows","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/read_redcap_tables.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download REDCap data — read_redcap_tables","text":"list instruments","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/read_redcap_tables.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Download REDCap data — read_redcap_tables","text":"","code":"# Examples will be provided later"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/redcap_wider.html","id":null,"dir":"Reference","previous_headings":"","what":"Redcap Wider — redcap_wider","title":"Redcap Wider — redcap_wider","text":"Converts list REDCap data frames long wide format. Handles longitudinal projects, yet repeated instruments.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/redcap_wider.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Redcap Wider — redcap_wider","text":"","code":"redcap_wider( list, event.glue = \"{.value}_{redcap_event_name}\", inst.glue = \"{.value}_{redcap_repeat_instance}\" )"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/redcap_wider.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Redcap Wider — redcap_wider","text":"list list data frames. event.glue dplyr::glue string repeated events naming inst.glue dplyr::glue string repeated instruments naming","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/redcap_wider.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Redcap Wider — redcap_wider","text":"list data frames wide format.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/redcap_wider.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Redcap Wider — redcap_wider","text":"","code":"list <- list(data.frame(record_id = c(1,2,1,2), redcap_event_name = c(\"baseline\", \"baseline\", \"followup\", \"followup\"), age = c(25,26,27,28)), data.frame(record_id = c(1,2), redcap_event_name = c(\"baseline\", \"baseline\"), gender = c(\"male\", \"female\"))) redcap_wider(list) #> Joining with `by = join_by(record_id)` #> record_id age_baseline age_followup gender #> 1 1 25 27 male #> 2 2 26 28 female"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/redcapcast_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Data set for demonstration — redcapcast_data","title":"Data set for demonstration — redcapcast_data","text":"small dataset REDCap database demonstrational purposes. Contains synthetic data.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/redcapcast_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Data set for demonstration — redcapcast_data","text":"","code":"data(redcapcast_data)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/redcapcast_data.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Data set for demonstration — redcapcast_data","text":"data frame 22 variables: record_id ID, numeric redcap_event_name Event name, character redcap_repeat_instrument Repeat instrument, character redcap_repeat_instance Repeat instance, numeric cpr CPR number, character inclusion Inclusion date, date dob Date birth, date age Age decimal, numeric age_integer Age integer, numeric sex Legal sex, character cohabitation Cohabitation status, character hypertension Hypertension, character diabetes diabetes, character region region, character baseline_data_start_complete Completed, character mrs_assessed mRS Assessed, character mrs_date Assesment date, date mrs_score Score, numeric mrs_complete Complete, numeric event_date Event date, date event_type Event type, character new_event_complete Completed, character","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/redcapcast_meta.html","id":null,"dir":"Reference","previous_headings":"","what":"REDCap metadata from data base — redcapcast_meta","title":"REDCap metadata from data base — redcapcast_meta","text":"metadata dataset REDCap database demonstrational purposes.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/redcapcast_meta.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"REDCap metadata from data base — redcapcast_meta","text":"","code":"data(redcapcast_meta)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/redcapcast_meta.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"REDCap metadata from data base — redcapcast_meta","text":"data frame 22 variables: field_name field_name, character form_name form_name, character section_header section_header, character field_type field_type, character field_label field_label, character select_choices_or_calculations select_choices_or_calculations, character field_note field_note, character text_validation_type_or_show_slider_number text_validation_type_or_show_slider_number, character text_validation_min text_validation_min, character text_validation_max text_validation_max, character identifier identifier, character branching_logic branching_logic, character required_field required_field, character custom_alignment custom_alignment, character question_number question_number, character matrix_group_name matrix_group_name, character matrix_ranking matrix_ranking, character field_annotation field_annotation, character","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/sanitize_split.html","id":null,"dir":"Reference","previous_headings":"","what":"Sanitize list of data frames — sanitize_split","title":"Sanitize list of data frames — sanitize_split","text":"Removing empty rows","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/sanitize_split.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sanitize list of data frames — sanitize_split","text":"","code":"sanitize_split( l, generic.names = c(\"record_id\", \"redcap_event_name\", \"redcap_repeat_instrument\", \"redcap_repeat_instance\") )"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/sanitize_split.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sanitize list of data frames — sanitize_split","text":"l list data frames. generic.names vector generic names excluded.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/sanitize_split.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sanitize list of data frames — sanitize_split","text":"list data frames generic names excluded.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/split_non_repeating_forms.html","id":null,"dir":"Reference","previous_headings":"","what":"Split a data frame into separate tables for each form — split_non_repeating_forms","title":"Split a data frame into separate tables for each form — split_non_repeating_forms","text":"Split data frame separate tables form","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/split_non_repeating_forms.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Split a data frame into separate tables for each form — split_non_repeating_forms","text":"","code":"split_non_repeating_forms(table, universal_fields, fields)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/split_non_repeating_forms.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Split a data frame into separate tables for each form — split_non_repeating_forms","text":"table data frame universal_fields character vector fields included every table fields two-column matrix containing names fields included form","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/split_non_repeating_forms.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Split a data frame into separate tables for each form — split_non_repeating_forms","text":"list data frames, one non-repeating form","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/split_non_repeating_forms.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Split a data frame into separate tables for each form — split_non_repeating_forms","text":"","code":"# Create a table table <- data.frame( id = c(1, 2, 3, 4, 5), form_a_name = c(\"John\", \"Alice\", \"Bob\", \"Eve\", \"Mallory\"), form_a_age = c(25, 30, 25, 15, 20), form_b_name = c(\"John\", \"Alice\", \"Bob\", \"Eve\", \"Mallory\"), form_b_gender = c(\"M\", \"F\", \"M\", \"F\", \"F\") ) # Create the universal fields universal_fields <- c(\"id\") # Create the fields fields <- matrix( c(\"form_a_name\", \"form_a\", \"form_a_age\", \"form_a\", \"form_b_name\", \"form_b\", \"form_b_gender\", \"form_b\"), ncol = 2, byrow = TRUE ) # Split the table split_non_repeating_forms(table, universal_fields, fields) #> $form_a_age #> id #> 1 1 #> 2 2 #> 3 3 #> 4 4 #> 5 5 #>"},{"path":"https://agdamsbo.github.io/REDCapCAST/news/index.html","id":"redcapcast-2361","dir":"Changelog","previous_headings":"","what":"REDCapCAST 23.6.1","title":"REDCapCAST 23.6.1","text":"CRAN release: 2023-06-06","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/news/index.html","id":"documentation-23-6-1","dir":"Changelog","previous_headings":"","what":"Documentation:","title":"REDCapCAST 23.6.1","text":"Updated description. Look! hex icon! Heading CRAN.","code":""},{"path":[]},{"path":"https://agdamsbo.github.io/REDCapCAST/news/index.html","id":"documentation-23-4-1","dir":"Changelog","previous_headings":"","what":"Documentation:","title":"REDCapCAST 23.4.1","text":"Aiming CRAN","code":""},{"path":[]},{"path":"https://agdamsbo.github.io/REDCapCAST/news/index.html","id":"documentation-23-3-2","dir":"Changelog","previous_headings":"","what":"Documentation:","title":"REDCapCAST 23.3.2","text":"Page added. Vignettes follow. GithubActions tests added code coverage assessed. Badge galore..","code":""},{"path":[]},{"path":"https://agdamsbo.github.io/REDCapCAST/news/index.html","id":"new-name-redcapcast-23-3-1","dir":"Changelog","previous_headings":"","what":"New name: REDCapCAST","title":"REDCapCAST 23.3.1","text":"reflect new functions limitation working R, changed naming fork, still, course, maintaining status fork. versioning moved monthly naming convention. main goal package keep option export defined subset whole dataset REDCap server made possible REDCapR::redcap_read() function, combine work put REDCapRITS package handling longitudinal projects /projects repeated instruments.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/news/index.html","id":"functions-23-3-1","dir":"Changelog","previous_headings":"","what":"Functions:","title":"REDCapCAST 23.3.1","text":"read_redcap_tables() NEW: function mainly implementation combined use REDCapR::readcap_read() REDCap_split() maintain focused nature REDCapR::readcap_read(), download specified data. Also implements tests valid form names event names. usual fall-back solution get data. redcap_wider() NEW: function pivots long data frames read_redcap_tables() using tidyr::pivot_wider(). focused_metadata() NEW: hidden helper function enable focused data acquisition approach handle subset metadata corresponding focused dataset.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/news/index.html","id":"notes-23-3-1","dir":"Changelog","previous_headings":"","what":"Notes:","title":"REDCapCAST 23.3.1","text":"metadata handling IMPROVED: improved handling different column names matadata (DataDictionary) REDCap dependent whether acquired thorugh api og downloaded server.","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/Introduction.html","id":"splitting-the-dataset","dir":"Articles","previous_headings":"","what":"Splitting the dataset","title":"Introduction","text":"","code":"redcapcast_data |> gt::gt() redcapcast_meta |> gt::gt() list <- REDCap_split(records = redcapcast_data, metadata = redcapcast_meta, forms = \"repeating\") str(list) #> List of 2 #> $ :'data.frame': 9 obs. of 17 variables: #> ..$ record_id : num [1:9] 1 2 2 3 3 3 4 4 5 #> ..$ redcap_event_name : chr [1:9] \"inclusion\" \"inclusion\" \"follow1\" \"inclusion\" ... #> ..$ cpr : chr [1:9] \"1203401OB4\" \"0102342303\" NA \"2301569823\" ... #> ..$ inclusion : Date[1:9], format: \"2023-03-13\" \"2023-03-01\" ... #> ..$ dob : Date[1:9], format: \"1940-03-12\" \"1934-02-01\" ... #> ..$ age : num [1:9] 83 89.1 NA 66.1 NA ... #> ..$ age_integer : num [1:9] 83 89 NA 66 NA NA 117 NA 126 #> ..$ sex : chr [1:9] \"female\" \"male\" NA \"male\" ... #> ..$ cohabitation : chr [1:9] \"Yes\" \"Yes\" NA \"No\" ... #> ..$ hypertension : chr [1:9] \"No\" \"No\" NA \"Yes\" ... #> ..$ diabetes : chr [1:9] \"Yes\" \"No\" NA \"Yes\" ... #> ..$ region : chr [1:9] \"East\" \"South\" NA \"North\" ... #> ..$ baseline_data_start_complete: chr [1:9] \"Incomplete\" \"Incomplete\" NA \"Incomplete\" ... #> ..$ mrs_assessed : chr [1:9] \"Yes\" \"Yes\" \"Yes\" NA ... #> ..$ mrs_date : Date[1:9], format: \"2023-03-13\" \"2023-03-07\" ... #> ..$ mrs_score : num [1:9] 1 1 3 NA 2 1 NA NA NA #> ..$ mrs_complete : chr [1:9] \"Incomplete\" \"Incomplete\" \"Incomplete\" \"Incomplete\" ... #> $ new_event:'data.frame': 9 obs. of 7 variables: #> ..$ record_id : num [1:9] 2 3 3 3 3 3 4 4 4 #> ..$ redcap_event_name : chr [1:9] \"follow1\" \"follow1\" \"follow1\" \"follow2\" ... #> ..$ redcap_repeat_instrument: chr [1:9] \"new_event\" \"new_event\" \"new_event\" \"new_event\" ... #> ..$ redcap_repeat_instance : num [1:9] 1 1 2 1 2 3 1 2 3 #> ..$ event_date : Date[1:9], format: \"2023-03-13\" \"2022-11-08\" ... #> ..$ event_type : chr [1:9] \"TIA\" \"AIS\" \"ICH\" \"ICH\" ... #> ..$ new_event_complete : chr [1:9] \"Incomplete\" \"Incomplete\" \"Incomplete\" \"Incomplete\" ... list <- REDCap_split(records = redcapcast_data, metadata = redcapcast_meta, forms = \"all\") str(list) #> List of 3 #> $ baseline_data_start:'data.frame': 9 obs. of 13 variables: #> ..$ record_id : num [1:9] 1 2 2 3 3 3 4 4 5 #> ..$ redcap_event_name : chr [1:9] \"inclusion\" \"inclusion\" \"follow1\" \"inclusion\" ... #> ..$ cpr : chr [1:9] \"1203401OB4\" \"0102342303\" NA \"2301569823\" ... #> ..$ inclusion : Date[1:9], format: \"2023-03-13\" \"2023-03-01\" ... #> ..$ dob : Date[1:9], format: \"1940-03-12\" \"1934-02-01\" ... #> ..$ age : num [1:9] 83 89.1 NA 66.1 NA ... #> ..$ age_integer : num [1:9] 83 89 NA 66 NA NA 117 NA 126 #> ..$ sex : chr [1:9] \"female\" \"male\" NA \"male\" ... #> ..$ cohabitation : chr [1:9] \"Yes\" \"Yes\" NA \"No\" ... #> ..$ hypertension : chr [1:9] \"No\" \"No\" NA \"Yes\" ... #> ..$ diabetes : chr [1:9] \"Yes\" \"No\" NA \"Yes\" ... #> ..$ region : chr [1:9] \"East\" \"South\" NA \"North\" ... #> ..$ baseline_data_start_complete: chr [1:9] \"Incomplete\" \"Incomplete\" NA \"Incomplete\" ... #> $ mrs :'data.frame': 9 obs. of 6 variables: #> ..$ record_id : num [1:9] 1 2 2 3 3 3 4 4 5 #> ..$ redcap_event_name: chr [1:9] \"inclusion\" \"inclusion\" \"follow1\" \"inclusion\" ... #> ..$ mrs_assessed : chr [1:9] \"Yes\" \"Yes\" \"Yes\" NA ... #> ..$ mrs_date : Date[1:9], format: \"2023-03-13\" \"2023-03-07\" ... #> ..$ mrs_score : num [1:9] 1 1 3 NA 2 1 NA NA NA #> ..$ mrs_complete : chr [1:9] \"Incomplete\" \"Incomplete\" \"Incomplete\" \"Incomplete\" ... #> $ new_event :'data.frame': 9 obs. of 7 variables: #> ..$ record_id : num [1:9] 2 3 3 3 3 3 4 4 4 #> ..$ redcap_event_name : chr [1:9] \"follow1\" \"follow1\" \"follow1\" \"follow2\" ... #> ..$ redcap_repeat_instrument: chr [1:9] \"new_event\" \"new_event\" \"new_event\" \"new_event\" ... #> ..$ redcap_repeat_instance : num [1:9] 1 1 2 1 2 3 1 2 3 #> ..$ event_date : Date[1:9], format: \"2023-03-13\" \"2022-11-08\" ... #> ..$ event_type : chr [1:9] \"TIA\" \"AIS\" \"ICH\" \"ICH\" ... #> ..$ new_event_complete : chr [1:9] \"Incomplete\" \"Incomplete\" \"Incomplete\" \"Incomplete\" ..."},{"path":"https://agdamsbo.github.io/REDCapCAST/articles/Introduction.html","id":"reading-data-from-redcap","dir":"Articles","previous_headings":"","what":"Reading data from REDCap","title":"Introduction","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/Introduction.html","id":"pivotting-to-wider-format","dir":"Articles","previous_headings":"","what":"Pivotting to wider format","title":"Introduction","text":"","code":"# redcap_wider(ds)"},{"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 (2023). REDCapCAST: REDCap Castellated Data Handling. https://github.com/agdamsbo/REDCapCAST, https://agdamsbo.github.io/REDCapCAST/.","code":"@Manual{, title = {REDCapCAST: REDCap Castellated Data Handling}, author = {Andreas Gammelgaard Damsbo and Paul Egeler}, year = {2023}, note = {https://github.com/agdamsbo/REDCapCAST, https://agdamsbo.github.io/REDCapCAST/}, }"},{"path":"https://agdamsbo.github.io/REDCapCAST/index.html","id":"redcapcast-package-","dir":"","previous_headings":"","what":"REDCap Castellated Data Handling","title":"REDCap Castellated Data Handling","text":"REDCap Castellated data handling using repeated instruments. package fork SpectrumHealthResearch/REDCapRITS. REDCapRITS represents great extensive work handle castellated REDCap data different programming languages. fork purely minded R usage includes implementations main REDCap_split function. main goal project allow “minimal data” approach allowing filter records, instruments variables export download data needed. think approach desireable handling sensitive, clinical data. similar functionality available similar tools (like REDCapR REDCapTidieR). Please refer REDCap-Tools great tools.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/index.html","id":"use-and-immprovements","dir":"","previous_headings":"","what":"Use and immprovements","title":"REDCap Castellated Data Handling","text":"package primarily relevant working longitudinal projects /projects using repeated instruments. just short descirption main functions: REDcap_split(): Works largely original REDCapRITS::REDCap_split(). takes REDCap dataset metadata (data dictionary) split data set list dataframes instruments. read_redcap_tables(): wraps use REDCapR::redcap_read() REDCap_split() ease export REDCap data. redcap_wider(): pivots data frame repeated instruments wide format utilizing tidyr::pivot_wider() tidyverse. Compared original REDCapRITS, matching functions improved accept column naming REDCap data manual download API export.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/index.html","id":"future","dir":"","previous_headings":"","what":"Future","title":"REDCap Castellated Data Handling","text":"plan package bundled Handbook working REDCap R. plan also include functionality assist casting (yes, pun intended) initial REDCap database.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"REDCap Castellated Data Handling","text":"Install latest version directly GitHub:","code":"remotes::install_github(\"agdamsbo/REDCapCAST\")"},{"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) { # 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/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/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/ds2dd.html","id":null,"dir":"Reference","previous_headings":"","what":"Data set to data dictionary function — ds2dd","title":"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-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"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 = names(redcapcast_meta) )"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/ds2dd.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"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::redcapcast_data.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/ds2dd.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"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":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"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 dob basis NA text #> 8 age basis NA text #> 9 age_integer basis NA text #> 10 sex basis NA text #> 11 cohabitation basis NA text #> 12 hypertension basis NA text #> 13 diabetes basis NA text #> 14 region basis NA text #> 15 baseline_data_start_complete basis NA text #> 16 mrs_assessed basis NA text #> 17 mrs_date basis NA text #> 18 mrs_score basis NA text #> 19 mrs_complete basis NA text #> 20 event_date basis NA text #> 21 event_type basis NA text #> 22 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 dob NA NA #> 8 age NA NA #> 9 age_integer NA NA #> 10 sex NA NA #> 11 cohabitation NA NA #> 12 hypertension NA NA #> 13 diabetes NA NA #> 14 region NA NA #> 15 baseline_data_start_complete NA NA #> 16 mrs_assessed NA NA #> 17 mrs_date NA NA #> 18 mrs_score NA NA #> 19 mrs_complete NA NA #> 20 event_date NA NA #> 21 event_type NA NA #> 22 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 #> 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 #> 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 #> 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 #> #> $`Column names` #> [1] \"record_id\" \"redcap_event_name\" #> [3] \"redcap_repeat_instrument\" \"redcap_repeat_instance\" #> [5] \"cpr\" \"inclusion\" #> [7] \"dob\" \"age\" #> [9] \"age_integer\" \"sex\" #> [11] \"cohabitation\" \"hypertension\" #> [13] \"diabetes\" \"region\" #> [15] \"baseline_data_start_complete\" \"mrs_assessed\" #> [17] \"mrs_date\" \"mrs_score\" #> [19] \"mrs_complete\" \"event_date\" #> [21] \"event_type\" \"new_event_complete\" #>"},{"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/match_fields_to_form.html","id":null,"dir":"Reference","previous_headings":"","what":"Match fields to forms — match_fields_to_form","title":"Match fields to forms — match_fields_to_form","text":"Match fields forms","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/match_fields_to_form.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Match fields to forms — match_fields_to_form","text":"","code":"match_fields_to_form(metadata, vars_in_data)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/match_fields_to_form.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Match fields to forms — match_fields_to_form","text":"metadata data frame containing field names form names vars_in_data character vector variable names","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/match_fields_to_form.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Match fields to forms — match_fields_to_form","text":"data frame containing field names form names","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/read_redcap_tables.html","id":null,"dir":"Reference","previous_headings":"","what":"Download REDCap data — read_redcap_tables","title":"Download REDCap data — read_redcap_tables","text":"Implementation REDCap_split focused data acquisition approach using REDCapR::redcap_read nad downloading specified fields, forms /events using built-focused_metadata including clean-. Works longitudinal projects repeating instruments.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/read_redcap_tables.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download REDCap data — read_redcap_tables","text":"","code":"read_redcap_tables( uri, token, records = NULL, fields = NULL, events = NULL, forms = NULL, raw_or_label = \"label\", split_forms = \"all\", generics = c(\"record_id\", \"redcap_event_name\", \"redcap_repeat_instrument\", \"redcap_repeat_instance\") )"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/read_redcap_tables.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download REDCap data — read_redcap_tables","text":"uri REDCap database uri token API token records records download fields fields download events events download forms forms download raw_or_label raw label tags split_forms Whether split \"repeating\" \"\" forms, default . generics vector auto-generated generic variable names ignore discarding empty rows","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/read_redcap_tables.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download REDCap data — read_redcap_tables","text":"list instruments","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/read_redcap_tables.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Download REDCap data — read_redcap_tables","text":"","code":"# Examples will be provided later"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/redcap_wider.html","id":null,"dir":"Reference","previous_headings":"","what":"Redcap Wider — redcap_wider","title":"Redcap Wider — redcap_wider","text":"Converts list REDCap data frames long wide format. Handles longitudinal projects, yet repeated instruments.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/redcap_wider.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Redcap Wider — redcap_wider","text":"","code":"redcap_wider( list, event.glue = \"{.value}_{redcap_event_name}\", inst.glue = \"{.value}_{redcap_repeat_instance}\" )"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/redcap_wider.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Redcap Wider — redcap_wider","text":"list list data frames. event.glue dplyr::glue string repeated events naming inst.glue dplyr::glue string repeated instruments naming","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/redcap_wider.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Redcap Wider — redcap_wider","text":"list data frames wide format.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/redcap_wider.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Redcap Wider — redcap_wider","text":"","code":"list <- list(data.frame(record_id = c(1,2,1,2), redcap_event_name = c(\"baseline\", \"baseline\", \"followup\", \"followup\"), age = c(25,26,27,28)), data.frame(record_id = c(1,2), redcap_event_name = c(\"baseline\", \"baseline\"), gender = c(\"male\", \"female\"))) redcap_wider(list) #> Joining with `by = join_by(record_id)` #> record_id age_baseline age_followup gender #> 1 1 25 27 male #> 2 2 26 28 female"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/redcapcast_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Data set for demonstration — redcapcast_data","title":"Data set for demonstration — redcapcast_data","text":"small dataset REDCap database demonstrational purposes. Contains synthetic data.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/redcapcast_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Data set for demonstration — redcapcast_data","text":"","code":"data(redcapcast_data)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/redcapcast_data.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Data set for demonstration — redcapcast_data","text":"data frame 22 variables: record_id ID, numeric redcap_event_name Event name, character redcap_repeat_instrument Repeat instrument, character redcap_repeat_instance Repeat instance, numeric cpr CPR number, character inclusion Inclusion date, date dob Date birth, date age Age decimal, numeric age_integer Age integer, numeric sex Legal sex, character cohabitation Cohabitation status, character hypertension Hypertension, character diabetes diabetes, character region region, character baseline_data_start_complete Completed, character mrs_assessed mRS Assessed, character mrs_date Assesment date, date mrs_score Score, numeric mrs_complete Complete, numeric event_date Event date, date event_type Event type, character new_event_complete Completed, character","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/redcapcast_meta.html","id":null,"dir":"Reference","previous_headings":"","what":"REDCap metadata from data base — redcapcast_meta","title":"REDCap metadata from data base — redcapcast_meta","text":"metadata dataset REDCap database demonstrational purposes.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/redcapcast_meta.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"REDCap metadata from data base — redcapcast_meta","text":"","code":"data(redcapcast_meta)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/redcapcast_meta.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"REDCap metadata from data base — redcapcast_meta","text":"data frame 22 variables: field_name field_name, character form_name form_name, character section_header section_header, character field_type field_type, character field_label field_label, character select_choices_or_calculations select_choices_or_calculations, character field_note field_note, character text_validation_type_or_show_slider_number text_validation_type_or_show_slider_number, character text_validation_min text_validation_min, character text_validation_max text_validation_max, character identifier identifier, character branching_logic branching_logic, character required_field required_field, character custom_alignment custom_alignment, character question_number question_number, character matrix_group_name matrix_group_name, character matrix_ranking matrix_ranking, character field_annotation field_annotation, character","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/sanitize_split.html","id":null,"dir":"Reference","previous_headings":"","what":"Sanitize list of data frames — sanitize_split","title":"Sanitize list of data frames — sanitize_split","text":"Removing empty rows","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/sanitize_split.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sanitize list of data frames — sanitize_split","text":"","code":"sanitize_split( l, generic.names = c(\"record_id\", \"redcap_event_name\", \"redcap_repeat_instrument\", \"redcap_repeat_instance\") )"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/sanitize_split.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sanitize list of data frames — sanitize_split","text":"l list data frames. generic.names vector generic names excluded.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/sanitize_split.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sanitize list of data frames — sanitize_split","text":"list data frames generic names excluded.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/split_non_repeating_forms.html","id":null,"dir":"Reference","previous_headings":"","what":"Split a data frame into separate tables for each form — split_non_repeating_forms","title":"Split a data frame into separate tables for each form — split_non_repeating_forms","text":"Split data frame separate tables form","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/split_non_repeating_forms.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Split a data frame into separate tables for each form — split_non_repeating_forms","text":"","code":"split_non_repeating_forms(table, universal_fields, fields)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/split_non_repeating_forms.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Split a data frame into separate tables for each form — split_non_repeating_forms","text":"table data frame universal_fields character vector fields included every table fields two-column matrix containing names fields included form","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/split_non_repeating_forms.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Split a data frame into separate tables for each form — split_non_repeating_forms","text":"list data frames, one non-repeating form","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/split_non_repeating_forms.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Split a data frame into separate tables for each form — split_non_repeating_forms","text":"","code":"# Create a table table <- data.frame( id = c(1, 2, 3, 4, 5), form_a_name = c(\"John\", \"Alice\", \"Bob\", \"Eve\", \"Mallory\"), form_a_age = c(25, 30, 25, 15, 20), form_b_name = c(\"John\", \"Alice\", \"Bob\", \"Eve\", \"Mallory\"), form_b_gender = c(\"M\", \"F\", \"M\", \"F\", \"F\") ) # Create the universal fields universal_fields <- c(\"id\") # Create the fields fields <- matrix( c(\"form_a_name\", \"form_a\", \"form_a_age\", \"form_a\", \"form_b_name\", \"form_b\", \"form_b_gender\", \"form_b\"), ncol = 2, byrow = TRUE ) # Split the table split_non_repeating_forms(table, universal_fields, fields) #> $form_a_age #> id #> 1 1 #> 2 2 #> 3 3 #> 4 4 #> 5 5 #>"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/strsplitx.html","id":null,"dir":"Reference","previous_headings":"","what":"Extended string splitting — strsplitx","title":"Extended string splitting — strsplitx","text":"Can used substitute base function. Main claim fame easing split around defined delimiter, see example.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/strsplitx.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extended string splitting — strsplitx","text":"","code":"strsplitx(x, split, type = \"classic\", perl = FALSE, ...)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/strsplitx.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extended string splitting — strsplitx","text":"x data split delimiter type Split type. Can c(\"classic\", \"\", \"\", \"around\") perl perl param strsplit() ... additional parameters passed base strsplit handling splits","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/strsplitx.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extended string splitting — strsplitx","text":"list","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/strsplitx.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extended string splitting — strsplitx","text":"","code":"test <- c(\"12 months follow-up\", \"3 steps\", \"mRS 6 weeks\", \"Counting to 231 now\") strsplitx(test,\"[0-9]\",type=\"around\") #> [[1]] #> [1] \"1\" \"2\" \" months follow-up\" #> #> [[2]] #> [1] \"3\" \" steps\" #> #> [[3]] #> [1] \"mRS \" \"6\" \" weeks\" #> #> [[4]] #> [1] \"Counting to \" \"2\" \"3\" \"1\" \" now\" #>"},{"path":"https://agdamsbo.github.io/REDCapCAST/news/index.html","id":"redcapcast-2362","dir":"Changelog","previous_headings":"","what":"REDCapCAST 23.6.2","title":"REDCapCAST 23.6.2","text":"version marks introduction helper functions handle database creation.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/news/index.html","id":"functions-23-6-2","dir":"Changelog","previous_headings":"","what":"Functions","title":"REDCapCAST 23.6.2","text":"New: ds2dd() function migrating stRoke-package. Assists building data dictionary REDCap dataset. New: strsplitx() function ease string splitting extension base::strsplit(). Inspiration https://stackoverflow.com//11014253/21019325 https://www.r-bloggers.com/2018/04/strsplit--keeping--delimiter/. New: d2n() function converts single digits written numbers. Used sanitize variable form names REDCap database creation. universal number word suggest english::word() xfun::numbers_to_words(), though testing .","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/news/index.html","id":"redcapcast-2361","dir":"Changelog","previous_headings":"","what":"REDCapCAST 23.6.1","title":"REDCapCAST 23.6.1","text":"CRAN release: 2023-06-06","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/news/index.html","id":"documentation-23-6-1","dir":"Changelog","previous_headings":"","what":"Documentation:","title":"REDCapCAST 23.6.1","text":"Updated description. Look! hex icon! Heading CRAN.","code":""},{"path":[]},{"path":"https://agdamsbo.github.io/REDCapCAST/news/index.html","id":"documentation-23-4-1","dir":"Changelog","previous_headings":"","what":"Documentation:","title":"REDCapCAST 23.4.1","text":"Aiming CRAN","code":""},{"path":[]},{"path":"https://agdamsbo.github.io/REDCapCAST/news/index.html","id":"documentation-23-3-2","dir":"Changelog","previous_headings":"","what":"Documentation:","title":"REDCapCAST 23.3.2","text":"Page added. Vignettes follow. GithubActions tests added code coverage assessed. Badge galore..","code":""},{"path":[]},{"path":"https://agdamsbo.github.io/REDCapCAST/news/index.html","id":"new-name-redcapcast-23-3-1","dir":"Changelog","previous_headings":"","what":"New name: REDCapCAST","title":"REDCapCAST 23.3.1","text":"reflect new functions limitation working R, changed naming fork, still, course, maintaining status fork. versioning moved monthly naming convention. main goal package keep option export defined subset whole dataset REDCap server made possible REDCapR::redcap_read() function, combine work put REDCapRITS package handling longitudinal projects /projects repeated instruments.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/news/index.html","id":"functions-23-3-1","dir":"Changelog","previous_headings":"","what":"Functions:","title":"REDCapCAST 23.3.1","text":"read_redcap_tables() NEW: function mainly implementation combined use REDCapR::readcap_read() REDCap_split() maintain focused nature REDCapR::readcap_read(), download specified data. Also implements tests valid form names event names. usual fall-back solution get data. redcap_wider() NEW: function pivots long data frames read_redcap_tables() using tidyr::pivot_wider(). focused_metadata() NEW: hidden helper function enable focused data acquisition approach handle subset metadata corresponding focused dataset.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/news/index.html","id":"notes-23-3-1","dir":"Changelog","previous_headings":"","what":"Notes:","title":"REDCapCAST 23.3.1","text":"metadata handling IMPROVED: improved handling different column names matadata (DataDictionary) REDCap dependent whether acquired thorugh api og downloaded server.","code":""}] diff --git a/sitemap.xml b/sitemap.xml index 5baea2a..64445df 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -27,6 +27,12 @@ https://agdamsbo.github.io/REDCapCAST/reference/clean_redcap_name.html + + https://agdamsbo.github.io/REDCapCAST/reference/d2w.html + + + https://agdamsbo.github.io/REDCapCAST/reference/ds2dd.html + https://agdamsbo.github.io/REDCapCAST/reference/focused_metadata.html @@ -54,4 +60,7 @@ https://agdamsbo.github.io/REDCapCAST/reference/split_non_repeating_forms.html + + https://agdamsbo.github.io/REDCapCAST/reference/strsplitx.html +