Database-creation
- Source:vignettes/Database-creation.Rmd
+ Source: vignettes/Database-creation.Rmd
Database-creation.RmdREDCapCAST
- Source:vignettes/REDCapCAST.Rmd
+ Source: vignettes/REDCapCAST.Rmd
REDCapCAST.RmdShiny-app
- Source:vignettes/Shiny-app.Rmd
+ Source: vignettes/Shiny-app.Rmd
Shiny-app.RmdCitation
-Source: DESCRIPTION
Source: DESCRIPTION
Damsbo A, Egeler P (2026).
REDCapCAST: REDCap Metadata Casting and Castellated Data Handling.
diff --git a/authors.md b/authors.md
index 106d13b..a230582 100644
--- a/authors.md
+++ b/authors.md
@@ -10,7 +10,7 @@
## Citation
Source:
-[`DESCRIPTION`](https://github.com/agdamsbo/REDCapCAST/blob/main/DESCRIPTION)
+[`DESCRIPTION`](https://github.com/agdamsbo/REDCapCAST/blob/v26.1.1/DESCRIPTION)
Damsbo A, Egeler P (2026). *REDCapCAST: REDCap Metadata Casting and
Castellated Data Handling*. R package version 26.1.1,
diff --git a/news/index.html b/news/index.html
index 70b3362..dcacad8 100644
--- a/news/index.html
+++ b/news/index.html
@@ -35,11 +35,11 @@
CRAN release: 2026-01-29 25.11.1 was never pushed to CRAN, so this fills in for that. FIX: spelling FIX: Suggested dependencies were trimmed including {styler}. ...<\/p>'). — clean_field_label","title":"Very simple function to remove rich text formatting from field label and save the first paragraph (' ...<\/p>'). — clean_field_label","text":"simple function remove rich text formatting field label save first paragraph (' ...<\/p>').","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/clean_field_label.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Very simple function to remove rich text formatting from field label and save the first paragraph (' ...<\/p>'). — clean_field_label","text":"","code":"clean_field_label(data)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/clean_field_label.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Very simple function to remove rich text formatting from field label and save the first paragraph (' ...<\/p>'). — clean_field_label","text":"data field label","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/clean_field_label.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Very simple function to remove rich text formatting from field label and save the first paragraph (' ...<\/p>'). — clean_field_label","text":"character vector","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/clean_field_label.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Very simple function to remove rich text formatting from field label and save the first paragraph (' ...<\/p>'). — clean_field_label","text":"","code":"clean_field_label(\" Fazekas score<\/p><\/div>\") #> [1] \"Fazekas score\""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/clean_redcap_name.html","id":null,"dir":"Reference","previous_headings":"","what":"clean_redcap_name — clean_redcap_name","title":"clean_redcap_name — clean_redcap_name","text":"Stepwise removal non-alphanumeric characters, trailing white space, substitutes spaces underscores converts lower case. Trying make different naming conventions.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/clean_redcap_name.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"clean_redcap_name — clean_redcap_name","text":"","code":"clean_redcap_name(x)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/clean_redcap_name.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"clean_redcap_name — clean_redcap_name","text":"x vector data frame cleaning","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/clean_redcap_name.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"clean_redcap_name — clean_redcap_name","text":"vector data frame, format input","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/clean_redcap_name.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"clean_redcap_name — clean_redcap_name","text":"","code":"\"Research!, ne:ws? and c;l-.ls\" |> clean_redcap_name() #> [1] \"research_news_and_clls\" \"8_new_TEST_\" |> clean_redcap_name() #> [1] \"8_new_test\""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/compact_vec.html","id":null,"dir":"Reference","previous_headings":"","what":"Compacting a vector of any length with or without names — compact_vec","title":"Compacting a vector of any length with or without names — compact_vec","text":"Compacting vector length without names","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/compact_vec.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compacting a vector of any length with or without names — compact_vec","text":"","code":"compact_vec(data, nm.sep = \": \", val.sep = \"; \")"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/compact_vec.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compacting a vector of any length with or without names — compact_vec","text":"data vector, optionally named nm.sep string separating name value val.sep string separating values","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/compact_vec.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compacting a vector of any length with or without names — compact_vec","text":"character string","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/compact_vec.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compacting a vector of any length with or without names — compact_vec","text":"","code":"sample(seq_len(4), 20, TRUE) |> as_factor() |> named_levels() |> sort() |> compact_vec() #> [1] \"1: 1; 2: 2; 3: 3; 4: 4\" 1:6 |> compact_vec() #> [1] \"1; 2; 3; 4; 5; 6\" \"test\" |> compact_vec() #> [1] \"test\" sample(letters[1:9], 20, TRUE) |> compact_vec() #> [1] \"g; e; d; a; c; g; a; f; g; h; f; a; d; b; f; e; c; d; f; b\""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/create_html_table.html","id":null,"dir":"Reference","previous_headings":"","what":"Create two-column HTML table for data piping in REDCap instruments — create_html_table","title":"Create two-column HTML table for data piping in REDCap instruments — create_html_table","text":"Create two-column HTML table data piping REDCap instruments","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/create_html_table.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create two-column HTML table for data piping in REDCap instruments — create_html_table","text":"","code":"create_html_table(text, variable)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/create_html_table.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create two-column HTML table for data piping in REDCap instruments — create_html_table","text":"text descriptive text variable variable pipe","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/create_html_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create two-column HTML table for data piping in REDCap instruments — create_html_table","text":"character vector","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/create_html_table.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create two-column HTML table for data piping in REDCap instruments — create_html_table","text":"","code":"create_html_table(text = \"Patient ID\", variable = c(\"[cpr]\")) #> REDCapCAST 26.1.1
+REDCapCAST 26.1.1
REDCapCAST: REDCap Metadata Casting and Castellated Data Handling
- Source: R/REDCapCAST-package.R
+ Source: R/REDCapCAST-package.R
REDCapCAST-package.RdSplit REDCap repeating instruments table into multiple tables
- Source: R/REDCap_split.r
+ Source: R/REDCap_split.r
REDCap_split.RdPreserve all factor levels from REDCap data dictionary in data export
- Source: R/read_redcap_tables.R
+ Source: R/read_redcap_tables.R
apply_factor_labels.RdApply REDCap filed labels to data frame
- Source: R/read_redcap_tables.R
+ Source: R/read_redcap_tables.R
apply_field_label.RdConvert labelled vectors to factors while preserving attributes
- Source: R/as_factor.R
+ Source: R/as_factor.R
as_factor.RdInterpret specific binary values as logicals
- Source: R/as_logical.R
+ Source: R/as_logical.R
as_logical.RdOverview of REDCapCAST data for shiny
- Source: R/shiny_cast.R
+ Source: R/shiny_cast.R
cast_data_overview.RdOverview of REDCapCAST meta data for shiny
- Source: R/shiny_cast.R
+ Source: R/shiny_cast.R
cast_meta_overview.RdSimple function to generate REDCap choices from character vector
- Source: R/doc2dd.R
+ Source: R/doc2dd.R
char2choice.RdSimple function to generate REDCap branching logic from character vector
- Source: R/doc2dd.R
+ Source: R/doc2dd.R
char2cond.RdVery simple function to remove rich text formatting from field label and save the first paragraph ('<p>...</p>').
- Source: R/read_redcap_tables.R
+ Source: R/read_redcap_tables.R
clean_field_label.RdCompacting a vector of any length with or without names
- Source: R/ds2dd_detailed.R
+ Source: R/ds2dd_detailed.R
compact_vec.RdCreate two-column HTML table for data piping in REDCap instruments
- Source: R/html_styling.R
+ Source: R/html_styling.R
create_html_table.RdDEPRECATED Create zips file with necessary content based on data set
- Source: R/export_redcap_instrument.R
+ Source: R/export_redcap_instrument.R
create_instrument_meta.RdDoc table to data dictionary - EARLY, DOCS MISSING
- Source: R/doc2dd.R
+ Source: R/doc2dd.R
doc2dd.Rd(DEPRECATED) Data set to data dictionary function
- Source: R/ds2dd_detailed.R
+ Source: R/ds2dd_detailed.R
ds2dd.RdExtract data from stata file for data dictionary
- Source: R/ds2dd_detailed.R
+ Source: R/ds2dd_detailed.R
ds2dd_detailed.RdSecure API key storage and data acquisition in one
- Source: R/easy_redcap.R
+ Source: R/easy_redcap.R
easy_redcap.RdCreates zip-file with necessary content to manually add instrument to database
- Source: R/export_redcap_instrument.R
+ Source: R/export_redcap_instrument.R
export_redcap_instrument.RdAllows conversion of factor to numeric values preserving original levels
- Source: R/as_factor.R
+ Source: R/as_factor.R
fct2num.RdDEPRECATED Helper to import files correctly
- Source: R/shiny_cast.R
+ Source: R/shiny_cast.R
file_extension.RdConverts REDCap choices to factor levels and stores in labels attribute
- Source: R/read_redcap_tables.R
+ Source: R/read_redcap_tables.R
format_redcap_factor.RdSub-header formatting wrapper
- Source: R/html_styling.R
+ Source: R/html_styling.R
format_subheader.RdRetrieve project API key if stored, if not, set and retrieve
- Source: R/easy_redcap.R
+ Source: R/easy_redcap.R
get_api_key.RdGuess time variables based on naming pattern
- Source: R/ds2dd_detailed.R
+ Source: R/ds2dd_detailed.R
guess_time_only.RdTry at determining which are true time only variables
- Source: R/ds2dd_detailed.R
+ Source: R/ds2dd_detailed.R
guess_time_only_filter.RdFinish incomplete haven attributes substituting missings with values
- Source: R/as_factor.R
+ Source: R/as_factor.R
haven_all_levels.RdChange "hms" to "character" for REDCap upload.
- Source: R/ds2dd_detailed.R
+ Source: R/ds2dd_detailed.R
hms2character.RdSimple html tag wrapping for REDCap text formatting
- Source: R/html_styling.R
+ Source: R/html_styling.R
html_tag_wrap.RdTest if repeatable or longitudinal
- Source: R/utils.r
+ Source: R/utils.r
is_repeated_longitudinal.RdCompletion marking based on completed upload
- Source: R/ds2dd_detailed.R
+ Source: R/ds2dd_detailed.R
mark_complete.Rdmtcars dataset slightly modified to use for Shiny app upload demonstration
- Source: R/mtcars_redcap.R
+ Source: R/mtcars_redcap.R
mtcars_redcap.RdGet named vector of factor levels and values
- Source: R/as_factor.R
+ Source: R/as_factor.R
named_levels.RdNav_bar defining function for shiny ui
- Source: R/shiny_cast.R
+ Source: R/shiny_cast.R
nav_bar_page.RdApplying var2fct across data set
- Source: R/ds2dd_detailed.R
+ Source: R/ds2dd_detailed.R
numchar2fct.RdHelper to auto-parse un-formatted data with haven and readr
- Source: R/ds2dd_detailed.R
+ Source: R/ds2dd_detailed.R
parse_data.RdTests if vector can be interpreted as numeric without introducing NAs by coercion
- Source: R/as_factor.R
+ Source: R/as_factor.R
possibly_numeric.RdTest if vector can be interpreted as roman numerals
- Source: R/as_factor.R
+ Source: R/as_factor.R
possibly_roman.RdUser input processing character
- Source: R/process_user_input.r
+ Source: R/process_user_input.r
process_user_input.character.RdUser input processing data.frame
- Source: R/process_user_input.r
+ Source: R/process_user_input.r
process_user_input.data.frame.RdUser input processing default
- Source: R/process_user_input.r
+ Source: R/process_user_input.r
process_user_input.default.RdUser input processing
- Source: R/process_user_input.r
+ Source: R/process_user_input.r
process_user_input.RdUser input processing response
- Source: R/process_user_input.r
+ Source: R/process_user_input.r
process_user_input.response.RdFlexible file import based on extension
- Source: R/shiny_cast.R
+ Source: R/shiny_cast.R
read_input.RdConvenience function to download complete instrument, using token storage in keyring.
- Source: R/read_redcap_instrument.R
+ Source: R/read_redcap_instrument.R
read_redcap_instrument.RdDownload REDCap data
- Source: R/read_redcap_tables.R
+ Source: R/read_redcap_tables.R
read_redcap_tables.RdTransforms list of REDCap data.frames to a single wide data.frame
- Source: R/redcap_wider.R
+ Source: R/redcap_wider.R
redcap_wider.RdData set for demonstration
- Source: R/redcapcast_data.R
+ Source: R/redcapcast_data.R
redcapcast_data.RdREDCap metadata from data base
- Source: R/redcapcast_meta.R
+ Source: R/redcapcast_meta.R
redcapcast_meta.RdReplace curly apostrophes and quotes from word
- Source: R/doc2dd.R
+ Source: R/doc2dd.R
replace_curly_quote.RdSet attributes for named attribute. Appends if attr is NULL
- Source: R/as_factor.R
+ Source: R/as_factor.R
set_attr.RdLaunch the included Shiny-app for database casting and upload
- Source: R/shiny_cast.R
+ Source: R/shiny_cast.R
shiny_cast.RdSplit a data frame into separate tables for each form
- Source: R/utils.r
+ Source: R/utils.r
split_non_repeating_forms.RdTransfer variable name suffix to label in widened data
- Source: R/redcap_wider.R
+ Source: R/redcap_wider.R
suffix2label.RdCorrection based on time_only_filter function
- Source: R/ds2dd_detailed.R
+ Source: R/ds2dd_detailed.R
time_only_correction.RdConvert vector to factor based on threshold of number of unique levels
- Source: R/ds2dd_detailed.R
+ Source: R/ds2dd_detailed.R
var2fct.RdNamed vector to REDCap choices (`wrapping compact_vec()`)
- Source: R/ds2dd_detailed.R
+ Source: R/ds2dd_detailed.R
vec2choice.Rd
Patient ID
<\/span><\/h5> <\/td> [cpr]<\/span><\/h5> <\/td> <\/tr><\/tbody> <\/table> create_html_table(text = paste(\"assessor\", 1:2, sep = \"_\"), variable = c(\"[cpr]\")) #>
assessor_1
<\/span><\/h5> <\/td> [cpr]<\/span><\/h5> <\/td> <\/tr>
assessor_2
<\/span><\/h5> <\/td> [cpr]<\/span><\/h5> <\/td> <\/tr><\/tbody> <\/table> # create_html_table(text = c(\"CPR nummer\",\"Word\"), variable = c(\"[cpr][1]\", \"[cpr][2]\", \"[test]\"))"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/create_instrument_meta.html","id":null,"dir":"Reference","previous_headings":"","what":"DEPRECATED Create zips file with necessary content based on data set — create_instrument_meta","title":"DEPRECATED Create zips file with necessary content based on data set — create_instrument_meta","text":"Use export_redcap_instrument() Metadata can added editing data dictionary project initial design phase. want later add new instruments, function can used create () instrument(s) add project production.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/create_instrument_meta.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"DEPRECATED Create zips file with necessary content based on data set — create_instrument_meta","text":"","code":"create_instrument_meta(data, dir = here::here(\"\"), record.id = TRUE)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/create_instrument_meta.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"DEPRECATED Create zips file with necessary content based on data set — create_instrument_meta","text":"data metadata relevant instrument. `ds2dd_detailed()` dir destination dir instrument zip. Default current WD. record.id flag omit first row data dictionary assuming record_id field included instrument. Default TRUE.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/create_instrument_meta.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"DEPRECATED Create zips file with necessary content based on data set — create_instrument_meta","text":"list","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/create_instrument_meta.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"DEPRECATED Create zips file with necessary content based on data set — create_instrument_meta","text":"","code":"if (FALSE) { # \\dontrun{ data <- iris |> ds2dd_detailed( add.auto.id = TRUE, form.name = sample(c(\"b\", \"c\"), size = 6, replace = TRUE, prob = rep(.5, 2) ) ) |> purrr::pluck(\"meta\") # data |> create_instrument_meta() data <- iris |> ds2dd_detailed(add.auto.id = FALSE) |> purrr::pluck(\"data\") iris |> setNames(glue::glue(\"{sample(x = c('a','b'),size = length(ncol(iris)), replace=TRUE,prob = rep(x=.5,2))}__{names(iris)}\")) |> ds2dd_detailed(form.sep = \"__\") data |> purrr::pluck(\"meta\") |> create_instrument_meta(record.id = FALSE) } # }"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/cut_string_length.html","id":null,"dir":"Reference","previous_headings":"","what":"Cut string to desired length — cut_string_length","title":"Cut string to desired length — cut_string_length","text":"Cut string desired length","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/cut_string_length.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cut string to desired length — cut_string_length","text":"","code":"cut_string_length(data, l = 100)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/cut_string_length.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cut string to desired length — cut_string_length","text":"data data l length","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/cut_string_length.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Cut string to desired length — cut_string_length","text":"character string length l","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/cut_string_length.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Cut string to desired length — cut_string_length","text":"","code":"\"length\" |> cut_string_length(l = 3) #> [1] \"len\""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/d2w.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert single digits to words — d2w","title":"Convert single digits to words — d2w","text":"Convert single digits words","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/d2w.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert single digits to words — d2w","text":"","code":"d2w(x, lang = \"en\", neutrum = FALSE, everything = FALSE)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/d2w.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert single digits to words — d2w","text":"x data. Handle vectors, data.frames lists lang language. Danish (da) English (en), Default \"en\" neutrum numbers depending counted word everything flag also split numbers >9 single digits","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/d2w.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert single digits to words — d2w","text":"returns characters format input","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/d2w.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert single digits to words — d2w","text":"","code":"d2w(c(2:8, 21)) #> [1] \"two\" \"three\" \"four\" \"five\" \"six\" \"seven\" \"eight\" \"21\" d2w(data.frame(2:7, 3:8, 1), lang = \"da\", neutrum = TRUE) #> X2.7 X3.8 X1 #> 1 to tre et #> 2 tre fire et #> 3 fire fem et #> 4 fem seks et #> 5 seks syv et #> 6 syv otte et ## If everything=T, also larger numbers are reduced. ## Elements in the list are same length as input d2w(list(2:8, c(2, 6, 4, 23), 2), everything = TRUE) #> [[1]] #> [1] \"two\" \"three\" \"four\" \"five\" \"six\" \"seven\" \"eight\" #> #> [[2]] #> [1] \"two\" \"six\" \"four\" \"two three\" #> #> [[3]] #> [1] \"two\" #>"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/doc2dd.html","id":null,"dir":"Reference","previous_headings":"","what":"Doc table to data dictionary - EARLY, DOCS MISSING — doc2dd","title":"Doc table to data dictionary - EARLY, DOCS MISSING — doc2dd","text":"Works well `project.aid::docx2list()`. Allows defining database text document (see provided template) easier use data base creation. approach allows easier collaboration defining database. generic case data frame variable names values column. format like REDCap data dictionary, gives options formatting.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/doc2dd.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Doc table to data dictionary - EARLY, DOCS MISSING — doc2dd","text":"","code":"doc2dd( data, instrument.name, col.variables = 1, list.datetime.format = list(date_dmy = \"_dat[eo]$\", time_hh_mm_ss = \"_ti[md]e?$\"), col.description = NULL, col.condition = NULL, col.subheader = NULL, subheader.tag = \"h2\", condition.minor.sep = \",\", condition.major.sep = \";\", col.calculation = NULL, col.choices = NULL, choices.char.sep = \"/\", missing.default = NA )"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/doc2dd.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Doc table to data dictionary - EARLY, DOCS MISSING — doc2dd","text":"data tibble data.frame variable names one column instrument.name character vector length one. Instrument name. col.variables variable names column (default = 1), allows dplyr subsetting list.datetime.format formatting date/time detection. See `case_match_regex_list()` col.description descriptions column, allows dplyr subsetting. empty, variable names used. col.condition conditions branching column, allows dplyr subsetting. See `char2cond()`. col.subheader sub-header column, allows dplyr subsetting. See `format_subheader()`. subheader.tag formatting tag. Default \"h2\" condition.minor.sep condition split minor. See `char2cond()`. Default \",\". condition.major.sep condition split major. See `char2cond()`. Default \";\". col.calculation calculations column. written exact. Character vector. col.choices choices column. See `char2choice()`. choices.char.sep choices split. See `char2choice()`. Default \"/\". missing.default value missing fields. Default NA.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/doc2dd.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Doc table to data dictionary - EARLY, DOCS MISSING — doc2dd","text":"tibble data.frame (data)","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/doc2dd.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Doc table to data dictionary - EARLY, DOCS MISSING — doc2dd","text":"","code":"# data <- dd_inst # data |> doc2dd(instrument.name = \"evt\", # col.description = 3, # col.condition = 4, # col.subheader = 2, # col.calculation = 5, # col.choices = 6)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/ds2dd.html","id":null,"dir":"Reference","previous_headings":"","what":"(DEPRECATED) Data set to data dictionary function — ds2dd","title":"(DEPRECATED) Data set to data dictionary function — ds2dd","text":"Creates basic data dictionary skeleton. Please see `ds2dd_detailed()` advanced function.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/ds2dd.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"(DEPRECATED) Data set to data dictionary function — ds2dd","text":"","code":"ds2dd( ds, record.id = \"record_id\", form.name = \"basis\", field.type = \"text\", field.label = NULL, include.column.names = FALSE, metadata = names(REDCapCAST::redcapcast_meta) )"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/ds2dd.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"(DEPRECATED) Data set to data dictionary function — ds2dd","text":"ds data set record.id name column number id variable, moved first row data dictionary, character integer. Default \"record_id\". form.name vector form names, character string, length 1 length equal number variables. Default \"basis\". field.type vector field types, character string, length 1 length equal number variables. Default \"text. field.label vector form names, character string, length 1 length equal number variables. Default NULL identical field names. include.column.names Flag give detailed output including new column names original data set upload. metadata Metadata column names. Default included names(REDCapCAST::redcapcast_meta).","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/ds2dd.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"(DEPRECATED) Data set to data dictionary function — ds2dd","text":"data.frame list data.frame vector","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/ds2dd.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"(DEPRECATED) Data set to data dictionary function — ds2dd","text":"Migrated stRoke ds2dd(). Fits better functionality 'REDCapCAST'.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/ds2dd.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"(DEPRECATED) Data set to data dictionary function — ds2dd","text":"","code":"redcapcast_data$record_id <- seq_len(nrow(redcapcast_data)) ds2dd(redcapcast_data, include.column.names = TRUE) #> $DataDictionary #> field_name form_name section_header field_type #> 1 record_id basis NA text #> 2 redcap_event_name basis NA text #> 3 redcap_repeat_instrument basis NA text #> 4 redcap_repeat_instance basis NA text #> 5 cpr basis NA text #> 6 inclusion basis NA text #> 7 inclusion_time basis NA text #> 8 dob basis NA text #> 9 age basis NA text #> 10 age_integer basis NA text #> 11 sex basis NA text #> 12 cohabitation basis NA text #> 13 hypertension basis NA text #> 14 diabetes basis NA text #> 15 region basis NA text #> 16 baseline_data_start_complete basis NA text #> 17 mrs_assessed basis NA text #> 18 mrs_date basis NA text #> 19 mrs_score basis NA text #> 20 mrs_complete basis NA text #> 21 con_mrs basis NA text #> 22 con_calc basis NA text #> 23 consensus_complete basis NA text #> 24 event_datetime basis NA text #> 25 event_age basis NA text #> 26 event_type basis NA text #> 27 new_event_complete basis NA text #> field_label select_choices_or_calculations field_note #> 1 record_id NA NA #> 2 redcap_event_name NA NA #> 3 redcap_repeat_instrument NA NA #> 4 redcap_repeat_instance NA NA #> 5 cpr NA NA #> 6 inclusion NA NA #> 7 inclusion_time NA NA #> 8 dob NA NA #> 9 age NA NA #> 10 age_integer NA NA #> 11 sex NA NA #> 12 cohabitation NA NA #> 13 hypertension NA NA #> 14 diabetes NA NA #> 15 region NA NA #> 16 baseline_data_start_complete NA NA #> 17 mrs_assessed NA NA #> 18 mrs_date NA NA #> 19 mrs_score NA NA #> 20 mrs_complete NA NA #> 21 con_mrs NA NA #> 22 con_calc NA NA #> 23 consensus_complete NA NA #> 24 event_datetime NA NA #> 25 event_age NA NA #> 26 event_type NA NA #> 27 new_event_complete NA NA #> text_validation_type_or_show_slider_number text_validation_min #> 1 NA NA #> 2 NA NA #> 3 NA NA #> 4 NA NA #> 5 NA NA #> 6 NA NA #> 7 NA NA #> 8 NA NA #> 9 NA NA #> 10 NA NA #> 11 NA NA #> 12 NA NA #> 13 NA NA #> 14 NA NA #> 15 NA NA #> 16 NA NA #> 17 NA NA #> 18 NA NA #> 19 NA NA #> 20 NA NA #> 21 NA NA #> 22 NA NA #> 23 NA NA #> 24 NA NA #> 25 NA NA #> 26 NA NA #> 27 NA NA #> text_validation_max identifier branching_logic required_field #> 1 NA NA NA NA #> 2 NA NA NA NA #> 3 NA NA NA NA #> 4 NA NA NA NA #> 5 NA NA NA NA #> 6 NA NA NA NA #> 7 NA NA NA NA #> 8 NA NA NA NA #> 9 NA NA NA NA #> 10 NA NA NA NA #> 11 NA NA NA NA #> 12 NA NA NA NA #> 13 NA NA NA NA #> 14 NA NA NA NA #> 15 NA NA NA NA #> 16 NA NA NA NA #> 17 NA NA NA NA #> 18 NA NA NA NA #> 19 NA NA NA NA #> 20 NA NA NA NA #> 21 NA NA NA NA #> 22 NA NA NA NA #> 23 NA NA NA NA #> 24 NA NA NA NA #> 25 NA NA NA NA #> 26 NA NA NA NA #> 27 NA NA NA NA #> custom_alignment question_number matrix_group_name matrix_ranking #> 1 NA NA NA NA #> 2 NA NA NA NA #> 3 NA NA NA NA #> 4 NA NA NA NA #> 5 NA NA NA NA #> 6 NA NA NA NA #> 7 NA NA NA NA #> 8 NA NA NA NA #> 9 NA NA NA NA #> 10 NA NA NA NA #> 11 NA NA NA NA #> 12 NA NA NA NA #> 13 NA NA NA NA #> 14 NA NA NA NA #> 15 NA NA NA NA #> 16 NA NA NA NA #> 17 NA NA NA NA #> 18 NA NA NA NA #> 19 NA NA NA NA #> 20 NA NA NA NA #> 21 NA NA NA NA #> 22 NA NA NA NA #> 23 NA NA NA NA #> 24 NA NA NA NA #> 25 NA NA NA NA #> 26 NA NA NA NA #> 27 NA NA NA NA #> field_annotation #> 1 NA #> 2 NA #> 3 NA #> 4 NA #> 5 NA #> 6 NA #> 7 NA #> 8 NA #> 9 NA #> 10 NA #> 11 NA #> 12 NA #> 13 NA #> 14 NA #> 15 NA #> 16 NA #> 17 NA #> 18 NA #> 19 NA #> 20 NA #> 21 NA #> 22 NA #> 23 NA #> 24 NA #> 25 NA #> 26 NA #> 27 NA #> #> $`Column names` #> [1] \"record_id\" \"redcap_event_name\" #> [3] \"redcap_repeat_instrument\" \"redcap_repeat_instance\" #> [5] \"cpr\" \"inclusion\" #> [7] \"inclusion_time\" \"dob\" #> [9] \"age\" \"age_integer\" #> [11] \"sex\" \"cohabitation\" #> [13] \"hypertension\" \"diabetes\" #> [15] \"region\" \"baseline_data_start_complete\" #> [17] \"mrs_assessed\" \"mrs_date\" #> [19] \"mrs_score\" \"mrs_complete\" #> [21] \"con_mrs\" \"con_calc\" #> [23] \"consensus_complete\" \"event_datetime\" #> [25] \"event_age\" \"event_type\" #> [27] \"new_event_complete\" #>"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/ds2dd_detailed.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract data from stata file for data dictionary — ds2dd_detailed","title":"Extract data from stata file for data dictionary — ds2dd_detailed","text":"Extract data stata file data dictionary","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/ds2dd_detailed.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract data from stata file for data dictionary — ds2dd_detailed","text":"","code":"ds2dd_detailed( data, add.auto.id = FALSE, date.format = \"dmy\", form.name = NULL, form.sep = NULL, form.prefix = TRUE, field.type = NULL, field.label = NULL, field.label.attr = \"label\", field.validation = NULL, metadata = names(REDCapCAST::redcapcast_meta), convert.logicals = FALSE )"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/ds2dd_detailed.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract data from stata file for data dictionary — ds2dd_detailed","text":"data data frame add.auto.id flag add id column date.format date format, character string. ymd/dmy/mdy. dafault dmy. form.name manually specify form name(s). Vector length 1 ncol(data). Default NULL \"data\" used. form.sep supplied dataset form names suffix prefix column/variable names, seperator can specified. supplied, form.name ignored. Default NULL. form.prefix Flag set form prefix (TRUE) suffix (FALSE) column names. Assumes columns pre- suffix specified. field.type manually specify field type(s). Vector length 1 ncol(data). Default NULL \"text\" used everything factors, wil get \"radio\". field.label manually specify field label(s). Vector length 1 ncol(data). Default NULL colnames(data) used attribute `field.label.attr` haven_labelled data set (imported .dta file `haven::read_dta()`). field.label.attr attribute name named labels haven_labelled data set (imported .dta file `haven::read_dta()`. Default \"label\" field.validation manually specify field validation(s). Vector length 1 ncol(data). Default NULL `levels()` used factors attribute `factor.labels.attr` haven_labelled data set (imported .dta file `haven::read_dta()`). metadata redcap metadata headings. Default names(REDCapCAST::redcapcast_meta). convert.logicals convert logicals factor. Default TRUE.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/ds2dd_detailed.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract data from stata file for data dictionary — ds2dd_detailed","text":"list length 2","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/ds2dd_detailed.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract data from stata file for data dictionary — ds2dd_detailed","text":"function natural development ds2dd() function. assumes first column ID-column. checks. Please, always inspect data dictionary upload. Ensure, data set formatted much information possible. `field.type` can supplied","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/ds2dd_detailed.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract data from stata file for data dictionary — ds2dd_detailed","text":"","code":"## Basic parsing with default options requireNamespace(\"REDCapCAST\") redcapcast_data |> dplyr::select(-dplyr::starts_with(\"redcap_\")) |> ds2dd_detailed() #> $data #> # A tibble: 25 × 24 #> record_id cpr inclusion inclusion_time dob age age_integer sex #>