Patient ID <\/span><\/h5> <\/td> [cpr]<\/span><\/h5> <\/td> <\/tr><\/tbody> <\/table> create_html_table(text = paste(\"assessor\", 1:2, sep = \"_\"), variable = c(\"[cpr]\")) #> assessor_1 <\/span><\/h5> <\/td> [cpr]<\/span><\/h5> <\/td> <\/tr> assessor_2 <\/span><\/h5> <\/td> [cpr]<\/span><\/h5> <\/td> <\/tr><\/tbody> <\/table> # create_html_table(text = c(\"CPR nummer\",\"Word\"), variable = c(\"[cpr][1]\", \"[cpr][2]\", \"[test]\"))"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/create_instrument_meta.html","id":null,"dir":"Reference","previous_headings":"","what":"DEPRICATED Create zips file with necessary content based on data set — create_instrument_meta","title":"DEPRICATED Create zips file with necessary content based on data set — create_instrument_meta","text":"Metadata can added editing data dictionary project initial design phase. want later add new instruments, function can used create () instrument(s) add project production.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/create_instrument_meta.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"DEPRICATED Create zips file with necessary content based on data set — create_instrument_meta","text":"","code":"create_instrument_meta(data, dir = here::here(\"\"), record.id = TRUE)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/create_instrument_meta.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"DEPRICATED Create zips file with necessary content based on data set — create_instrument_meta","text":"data metadata relevant instrument. `ds2dd_detailed()` dir destination dir instrument zip. Default current WD. record.id flag omit first row data dictionary assuming record_id field included instrument. Default TRUE.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/create_instrument_meta.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"DEPRICATED Create zips file with necessary content based on data set — create_instrument_meta","text":"list","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/create_instrument_meta.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"DEPRICATED Create zips file with necessary content based on data set — create_instrument_meta","text":"","code":"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\") #> A default id column has been added # 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 #> # A tibble: 150 × 5 #> Sepal.Length Sepal.Width Petal.Length Petal.Width Species #> #> 1 5.1 3.5 1.4 0.2 setosa #> 2 4.9 3 1.4 0.2 setosa #> 3 4.7 3.2 1.3 0.2 setosa #> 4 4.6 3.1 1.5 0.2 setosa #> 5 5 3.6 1.4 0.2 setosa #> 6 5.4 3.9 1.7 0.4 setosa #> 7 4.6 3.4 1.4 0.3 setosa #> 8 5 3.4 1.5 0.2 setosa #> 9 4.4 2.9 1.4 0.2 setosa #> 10 4.9 3.1 1.5 0.1 setosa #> # ℹ 140 more rows #> #> $meta #> # A tibble: 5 × 18 #> field_name form_name section_header field_type field_label #> #> 1 Sepal.Length b NA text Sepal.Length #> 2 Sepal.Width b NA text Sepal.Width #> 3 Petal.Length b NA text Petal.Length #> 4 Petal.Width b NA text Petal.Width #> 5 Species b NA radio Species #> # ℹ 13 more variables: select_choices_or_calculations , field_note , #> # text_validation_type_or_show_slider_number , #> # text_validation_min , text_validation_max , identifier , #> # branching_logic , required_field , custom_alignment , #> # question_number , matrix_group_name , matrix_ranking , #> # field_annotation #> # data |> # purrr::pluck(\"meta\") |> # create_instrument_meta(record.id = FALSE)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/d2w.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert single digits to words — d2w","title":"Convert single digits to words — d2w","text":"Convert single digits words","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/d2w.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert single digits to words — d2w","text":"","code":"d2w(x, lang = \"en\", neutrum = FALSE, everything = FALSE)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/d2w.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert single digits to words — d2w","text":"x data. Handle vectors, data.frames lists lang language. Danish (da) English (en), Default \"en\" neutrum numbers depending counted word everything flag also split numbers >9 single digits","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/d2w.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert single digits to words — d2w","text":"returns characters format input","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/d2w.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert single digits to words — d2w","text":"","code":"d2w(c(2:8, 21)) #> [1] \"two\" \"three\" \"four\" \"five\" \"six\" \"seven\" \"eight\" \"21\" d2w(data.frame(2:7, 3:8, 1), lang = \"da\", neutrum = TRUE) #> X2.7 X3.8 X1 #> 1 to tre et #> 2 tre fire et #> 3 fire fem et #> 4 fem seks et #> 5 seks syv et #> 6 syv otte et ## If everything=T, also larger numbers are reduced. ## Elements in the list are same length as input d2w(list(2:8, c(2, 6, 4, 23), 2), everything = TRUE) #> [[1]] #> [1] \"two\" \"three\" \"four\" \"five\" \"six\" \"seven\" \"eight\" #> #> [[2]] #> [1] \"two\" \"six\" \"four\" \"two three\" #> #> [[3]] #> [1] \"two\" #>"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/doc2dd.html","id":null,"dir":"Reference","previous_headings":"","what":"Doc table to data dictionary - EARLY, DOCS MISSING — doc2dd","title":"Doc table to data dictionary - EARLY, DOCS MISSING — doc2dd","text":"Works well `project.aid::docx2list()`. Allows defining database text document (see provided template) easier use data base creation. approach allows easier collaboration defining database. generic case data frame variable names values column. format like REDCap data dictionary, gives options formatting.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/doc2dd.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Doc table to data dictionary - EARLY, DOCS MISSING — doc2dd","text":"","code":"doc2dd( data, instrument.name, col.variables = 1, list.datetime.format = list(date_dmy = \"_dat[eo]$\", time_hh_mm_ss = \"_ti[md]e?$\"), col.description = NULL, col.condition = NULL, col.subheader = NULL, subheader.tag = \"h2\", condition.minor.sep = \",\", condition.major.sep = \";\", col.calculation = NULL, col.choices = NULL, choices.char.sep = \"/\", missing.default = NA )"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/doc2dd.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Doc table to data dictionary - EARLY, DOCS MISSING — doc2dd","text":"data tibble data.frame variable names one column instrument.name character vector length one. Instrument name. col.variables variable names column (default = 1), allows dplyr subsetting list.datetime.format formatting date/time detection. See `case_match_regex_list()` col.description descriptions column, allows dplyr subsetting. empty, variable names used. col.condition conditions branching column, allows dplyr subsetting. See `char2cond()`. col.subheader sub-header column, allows dplyr subsetting. See `format_subheader()`. subheader.tag formatting tag. Default \"h2\" condition.minor.sep condition split minor. See `char2cond()`. Default \",\". condition.major.sep condition split major. See `char2cond()`. Default \";\". col.calculation calculations column. written exact. Character vector. col.choices choices column. See `char2choice()`. choices.char.sep choices split. See `char2choice()`. Default \"/\". missing.default value missing fields. Default NA.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/doc2dd.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Doc table to data dictionary - EARLY, DOCS MISSING — doc2dd","text":"tibble data.frame (data)","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/doc2dd.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Doc table to data dictionary - EARLY, DOCS MISSING — doc2dd","text":"","code":"# data <- dd_inst # data |> doc2dd(instrument.name = \"evt\", # col.description = 3, # col.condition = 4, # col.subheader = 2, # col.calculation = 5, # col.choices = 6)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/ds2dd.html","id":null,"dir":"Reference","previous_headings":"","what":"(DEPRECATED) Data set to data dictionary function — ds2dd","title":"(DEPRECATED) Data set to data dictionary function — ds2dd","text":"Creates basic data dictionary skeleton. Please see `ds2dd_detailed()` advanced function.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/ds2dd.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"(DEPRECATED) Data set to data dictionary function — ds2dd","text":"","code":"ds2dd( ds, record.id = \"record_id\", form.name = \"basis\", field.type = \"text\", field.label = NULL, include.column.names = FALSE, metadata = metadata_names )"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/ds2dd.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"(DEPRECATED) Data set to data dictionary function — ds2dd","text":"ds data set record.id name column number id variable, moved first row data dictionary, character integer. Default \"record_id\". form.name vector form names, character string, length 1 length equal number variables. Default \"basis\". field.type vector field types, character string, length 1 length equal number variables. Default \"text. field.label vector form names, character string, length 1 length equal number variables. Default NULL identical field names. include.column.names Flag give detailed output including new column names original data set upload. metadata Metadata column names. Default included REDCapCAST::metadata_names.","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 event_datetime basis NA text #> 22 event_age basis NA text #> 23 event_type basis NA text #> 24 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 event_datetime NA NA #> 22 event_age NA NA #> 23 event_type NA NA #> 24 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 #> 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 #> 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 #> 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 #> #> $`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] \"event_datetime\" \"event_age\" #> [23] \"event_type\" \"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), validate.time = FALSE, time.var.sel.pos = \"[Tt]i[d(me)]\", time.var.sel.neg = \"[Dd]at[eo]\" )"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/ds2dd_detailed.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract data from stata file for data dictionary — ds2dd_detailed","text":"data data frame add.auto.id flag add id column date.format date format, character string. ymd/dmy/mdy. dafault dmy. form.name manually specify form name(s). Vector length 1 ncol(data). Default NULL \"data\" used. form.sep supplied dataset form names suffix prefix column/variable names, seperator can specified. supplied, form.name ignored. Default NULL. form.prefix Flag set form prefix (TRUE) suffix (FALSE) column names. Assumes columns pre- suffix specified. field.type manually specify field type(s). Vector length 1 ncol(data). Default NULL \"text\" used everything factors, wil get \"radio\". field.label manually specify field label(s). Vector length 1 ncol(data). Default NULL colnames(data) used attribute `field.label.attr` haven_labelled data set (imported .dta file `haven::read_dta()`). field.label.attr attribute name named labels haven_labelled data set (imported .dta file `haven::read_dta()`. Default \"label\" field.validation manually specify field validation(s). Vector length 1 ncol(data). Default NULL `levels()` used factors attribute `factor.labels.attr` haven_labelled data set (imported .dta file `haven::read_dta()`). metadata redcap metadata headings. Default REDCapCAST:::metadata_names. validate.time Flag validate guessed time columns time.var.sel.pos Positive selection regex string passed `gues_time_only_filter()` sel.pos. time.var.sel.neg Negative selection regex string passed `gues_time_only_filter()` sel.neg.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/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":"data <- REDCapCAST::redcapcast_data data |> ds2dd_detailed(validate.time = TRUE) #> $is.POSIX #> # A tibble: 19 × 2 #> inclusion_time event_datetime #> #> 1 12:38:49 NA #> 2 10:38:57 NA #> 3 NA NA #> 4 NA 2024-01-18 12:49:42 #> 5 12:01:07 NA #> 6 NA NA #> 7 NA NA #> 8 NA 2024-01-18 12:49:58 #> 9 NA 2024-01-18 12:50:01 #> 10 NA 2024-01-18 12:50:05 #> 11 NA 2024-01-18 12:50:07 #> 12 NA 2024-01-18 12:50:09 #> 13 20:39:19 NA #> 14 NA NA #> 15 NA 2024-01-18 12:50:19 #> 16 NA 2024-01-18 12:50:22 #> 17 NA 2024-01-18 12:50:24 #> 18 08:50:31 NA #> 19 08:49:28 NA #> #> $is.datetime #> # A tibble: 19 × 1 #> event_datetime #> #> 1 NA #> 2 NA #> 3 NA #> 4 2024-01-18 12:49:42 #> 5 NA #> 6 NA #> 7 NA #> 8 2024-01-18 12:49:58 #> 9 2024-01-18 12:50:01 #> 10 2024-01-18 12:50:05 #> 11 2024-01-18 12:50:07 #> 12 2024-01-18 12:50:09 #> 13 NA #> 14 NA #> 15 2024-01-18 12:50:19 #> 16 2024-01-18 12:50:22 #> 17 2024-01-18 12:50:24 #> 18 NA #> 19 NA #> #> $is.time_only #> # A tibble: 19 × 1 #> inclusion_time #> #> 1 12:38:49 #> 2 10:38:57 #> 3 NA #> 4 NA #> 5 12:01:07 #> 6 NA #> 7 NA #> 8 NA #> 9 NA #> 10 NA #> 11 NA #> 12 NA #> 13 20:39:19 #> 14 NA #> 15 NA #> 16 NA #> 17 NA #> 18 08:50:31 #> 19 08:49:28 #> data |> ds2dd_detailed() #> $data #> # A tibble: 19 × 24 #> record_id redcap_event_name redcap_repeat_instrument redcap_repeat_instance #> #> 1 1 inclusion NA NA #> 2 2 inclusion NA NA #> 3 2 follow1 NA NA #> 4 2 follow1 New Event (?) 1 #> 5 3 inclusion NA NA #> 6 3 follow1 NA NA #> 7 3 follow2 NA NA #> 8 3 follow1 New Event (?) 1 #> 9 3 follow1 New Event (?) 2 #> 10 3 follow2 New Event (?) 1 #> 11 3 follow2 New Event (?) 2 #> 12 3 follow2 New Event (?) 3 #> 13 4 inclusion NA NA #> 14 4 follow2 NA NA #> 15 4 follow2 New Event (?) 1 #> 16 4 follow2 New Event (?) 2 #> 17 4 follow2 New Event (?) 3 #> 18 5 inclusion NA NA #> 19 6 inclusion NA NA #> # ℹ 20 more variables: cpr , inclusion , inclusion_time , #> # dob , age , age_integer , sex , cohabitation , #> # hypertension , diabetes , region , #> # baseline_data_start_complete , mrs_assessed , mrs_date , #> # mrs_score , mrs_complete , event_datetime , #> # event_age , event_type , new_event_complete #> #> $meta #> # A tibble: 24 × 18 #> field_name form_name section_header field_type field_label #> #> 1 record_id data NA text record_id #> 2 redcap_event_name data NA text redcap_event_na… #> 3 redcap_repeat_instrument data NA text redcap_repeat_i… #> 4 redcap_repeat_instance data NA text redcap_repeat_i… #> 5 cpr data NA text cpr #> 6 inclusion data NA text inclusion #> 7 inclusion_time data NA text inclusion_time #> 8 dob data NA text dob #> 9 age data NA text age #> 10 age_integer data NA text age_integer #> # ℹ 14 more rows #> # ℹ 13 more variables: select_choices_or_calculations , field_note , #> # text_validation_type_or_show_slider_number , #> # text_validation_min , text_validation_max , identifier , #> # branching_logic , required_field , custom_alignment , #> # question_number , matrix_group_name , matrix_ranking , #> # field_annotation #> iris |> ds2dd_detailed(add.auto.id = TRUE) #> A default id column has been added #> $data #> # A tibble: 150 × 6 #> record_id sepal.length sepal.width petal.length petal.width species #> #> 1 1 5.1 3.5 1.4 0.2 setosa #> 2 2 4.9 3 1.4 0.2 setosa #> 3 3 4.7 3.2 1.3 0.2 setosa #> 4 4 4.6 3.1 1.5 0.2 setosa #> 5 5 5 3.6 1.4 0.2 setosa #> 6 6 5.4 3.9 1.7 0.4 setosa #> 7 7 4.6 3.4 1.4 0.3 setosa #> 8 8 5 3.4 1.5 0.2 setosa #> 9 9 4.4 2.9 1.4 0.2 setosa #> 10 10 4.9 3.1 1.5 0.1 setosa #> # ℹ 140 more rows #> #> $meta #> # A tibble: 6 × 18 #> field_name form_name section_header field_type field_label #> #> 1 record_id data NA text record_id #> 2 sepal.length data NA text sepal.length #> 3 sepal.width data NA text sepal.width #> 4 petal.length data NA text petal.length #> 5 petal.width data NA text petal.width #> 6 species data NA radio species #> # ℹ 13 more variables: select_choices_or_calculations , field_note , #> # text_validation_type_or_show_slider_number , #> # text_validation_min , text_validation_max , identifier , #> # branching_logic , required_field , custom_alignment , #> # question_number , matrix_group_name , matrix_ranking , #> # field_annotation #> iris |> ds2dd_detailed( add.auto.id = TRUE, form.name = sample(c(\"b\", \"c\"), size = 6, replace = TRUE, prob = rep(.5, 2)) ) |> purrr::pluck(\"meta\") #> A default id column has been added #> # A tibble: 6 × 18 #> field_name form_name section_header field_type field_label #> #> 1 record_id c NA text record_id #> 2 sepal.length b NA text sepal.length #> 3 sepal.width b NA text sepal.width #> 4 petal.length b NA text petal.length #> 5 petal.width c NA text petal.width #> 6 species c NA radio species #> # ℹ 13 more variables: select_choices_or_calculations , field_note , #> # text_validation_type_or_show_slider_number , #> # text_validation_min , text_validation_max , identifier , #> # branching_logic , required_field , custom_alignment , #> # question_number , matrix_group_name , matrix_ranking , #> # field_annotation mtcars |> ds2dd_detailed(add.auto.id = TRUE) #> A default id column has been added #> $data #> # A tibble: 32 × 12 #> record_id mpg cyl disp hp drat wt qsec vs am gear carb #> #> 1 1 21 6 160 110 3.9 2.62 16.5 0 1 4 4 #> 2 2 21 6 160 110 3.9 2.88 17.0 0 1 4 4 #> 3 3 22.8 4 108 93 3.85 2.32 18.6 1 1 4 1 #> 4 4 21.4 6 258 110 3.08 3.22 19.4 1 0 3 1 #> 5 5 18.7 8 360 175 3.15 3.44 17.0 0 0 3 2 #> 6 6 18.1 6 225 105 2.76 3.46 20.2 1 0 3 1 #> 7 7 14.3 8 360 245 3.21 3.57 15.8 0 0 3 4 #> 8 8 24.4 4 147. 62 3.69 3.19 20 1 0 4 2 #> 9 9 22.8 4 141. 95 3.92 3.15 22.9 1 0 4 2 #> 10 10 19.2 6 168. 123 3.92 3.44 18.3 1 0 4 4 #> # ℹ 22 more rows #> #> $meta #> # A tibble: 12 × 18 #> field_name form_name section_header field_type field_label #> #> 1 record_id data NA text record_id #> 2 mpg data NA text mpg #> 3 cyl data NA text cyl #> 4 disp data NA text disp #> 5 hp data NA text hp #> 6 drat data NA text drat #> 7 wt data NA text wt #> 8 qsec data NA text qsec #> 9 vs data NA text vs #> 10 am data NA text am #> 11 gear data NA text gear #> 12 carb data NA text carb #> # ℹ 13 more variables: select_choices_or_calculations , field_note , #> # text_validation_type_or_show_slider_number , #> # text_validation_min , text_validation_max , identifier , #> # branching_logic , required_field , custom_alignment , #> # question_number , matrix_group_name , matrix_ranking , #> # field_annotation #> data <- iris |> ds2dd_detailed(add.auto.id = TRUE) |> purrr::pluck(\"data\") #> A default id column has been added names(data) <- glue::glue(\"{sample(x = c('a','b'),size = length(names(data)), replace=TRUE,prob = rep(x=.5,2))}__{names(data)}\") data |> ds2dd_detailed(form.sep = \"__\") #> $data #> # A tibble: 150 × 6 #> record_id sepal.length sepal.width petal.length petal.width species #> #> 1 1 5.1 3.5 1.4 0.2 setosa #> 2 2 4.9 3 1.4 0.2 setosa #> 3 3 4.7 3.2 1.3 0.2 setosa #> 4 4 4.6 3.1 1.5 0.2 setosa #> 5 5 5 3.6 1.4 0.2 setosa #> 6 6 5.4 3.9 1.7 0.4 setosa #> 7 7 4.6 3.4 1.4 0.3 setosa #> 8 8 5 3.4 1.5 0.2 setosa #> 9 9 4.4 2.9 1.4 0.2 setosa #> 10 10 4.9 3.1 1.5 0.1 setosa #> # ℹ 140 more rows #> #> $meta #> # A tibble: 6 × 18 #> field_name form_name section_header field_type field_label #> #> 1 record_id b NA text record_id #> 2 sepal.length b NA text sepal.length #> 3 sepal.width b NA text sepal.width #> 4 petal.length b NA text petal.length #> 5 petal.width b NA text petal.width #> 6 species b NA radio species #> # ℹ 13 more variables: select_choices_or_calculations , field_note , #> # text_validation_type_or_show_slider_number , #> # text_validation_min , text_validation_max , identifier , #> # branching_logic , required_field , custom_alignment , #> # question_number , matrix_group_name , matrix_ranking , #> # field_annotation #>"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/easy_redcap.html","id":null,"dir":"Reference","previous_headings":"","what":"Secure API key storage and data acquisition in one — easy_redcap","title":"Secure API key storage and data acquisition in one — easy_redcap","text":"Secure API key storage data acquisition one","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/easy_redcap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Secure API key storage and data acquisition in one — easy_redcap","text":"","code":"easy_redcap(project.name, widen.data = TRUE, uri, ...)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/easy_redcap.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Secure API key storage and data acquisition in one — easy_redcap","text":"project.name name current project (key storage `keyring::key_set()`, using default keyring) widen.data argument widen exported data uri REDCap database API uri ... arguments passed `REDCapCAST::read_redcap_tables()`","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/easy_redcap.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Secure API key storage and data acquisition in one — easy_redcap","text":"data.frame list depending widen.data","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/export_redcap_instrument.html","id":null,"dir":"Reference","previous_headings":"","what":"Creates zip-file with necessary content to manually add instrument to database — export_redcap_instrument","title":"Creates zip-file with necessary content to manually add instrument to database — export_redcap_instrument","text":"Metadata can added editing data dictionary project initial design phase. want later add new instruments, function can used create () instrument(s) add project production.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/export_redcap_instrument.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creates zip-file with necessary content to manually add instrument to database — export_redcap_instrument","text":"","code":"export_redcap_instrument(data, file, force = FALSE, record.id = \"record_id\")"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/export_redcap_instrument.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creates zip-file with necessary content to manually add instrument to database — export_redcap_instrument","text":"data metadata relevant instrument. `ds2dd_detailed()` file destination file name. force force instrument creation ignore different form names just using first. record.id record id variable name. Default 'record_id'.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/export_redcap_instrument.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creates zip-file with necessary content to manually add instrument to database — export_redcap_instrument","text":"exports zip-file","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/export_redcap_instrument.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Creates zip-file with necessary content to manually add instrument to database — export_redcap_instrument","text":"","code":"#iris |> # ds2dd_detailed( # add.auto.id = TRUE, # form.name = sample(c(\"b\", \"c\"), size = 6, replace = TRUE, prob = rep(.5, 2)) # ) |> # purrr::pluck(\"meta\") |> # (\\(.x){ # split(.x, .x$form_name) # })() |> # purrr::imap(function(.x, .i){ # export_redcap_instrument(.x,file=here::here(paste0(.i,Sys.Date(),\".zip\"))) # }) #iris |> # ds2dd_detailed( # add.auto.id = TRUE # ) |> # purrr::pluck(\"meta\") |> # export_redcap_instrument(file=here::here(paste0(\"instrument\",Sys.Date(),\".zip\")))"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/file_extension.html","id":null,"dir":"Reference","previous_headings":"","what":"Helper to import files correctly — file_extension","title":"Helper to import files correctly — file_extension","text":"Helper import files correctly","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/file_extension.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Helper to import files correctly — file_extension","text":"","code":"file_extension(filenames)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/file_extension.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Helper to import files correctly — file_extension","text":"filenames file names","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/file_extension.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Helper to import files correctly — file_extension","text":"character vector","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/file_extension.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Helper to import files correctly — file_extension","text":"","code":"file_extension(list.files(here::here(\"\"))[[2]])[[1]] #> [1] \"\" file_extension(c(\"file.cd..ks\",\"file\")) #> [1] \"ks\" \"\""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/focused_metadata.html","id":null,"dir":"Reference","previous_headings":"","what":"focused_metadata — focused_metadata","title":"focused_metadata — focused_metadata","text":"Extracts limited metadata variables dataset","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/focused_metadata.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"focused_metadata — focused_metadata","text":"","code":"focused_metadata(metadata, vars_in_data)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/focused_metadata.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"focused_metadata — focused_metadata","text":"metadata dataframe containing metadata vars_in_data Vector variable names dataset","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/focused_metadata.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"focused_metadata — focused_metadata","text":"dataframe containing metadata variables dataset","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/format_subheader.html","id":null,"dir":"Reference","previous_headings":"","what":"Sub-header formatting wrapper — format_subheader","title":"Sub-header formatting wrapper — format_subheader","text":"Sub-header formatting wrapper","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/format_subheader.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sub-header formatting wrapper — format_subheader","text":"","code":"format_subheader(data, tag = \"h2\")"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/format_subheader.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sub-header formatting wrapper — format_subheader","text":"data character vector tag character vector length 1","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/format_subheader.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sub-header formatting wrapper — format_subheader","text":"character vector","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/format_subheader.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sub-header formatting wrapper — format_subheader","text":"","code":"\"Instrument header\" |> format_subheader() #> Instrument header<\/h2><\/div>"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/get_api_key.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieve project API key if stored, if not, set and retrieve — get_api_key","title":"Retrieve project API key if stored, if not, set and retrieve — get_api_key","text":"Retrieve project API key stored, , set retrieve","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/get_api_key.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieve project API key if stored, if not, set and retrieve — get_api_key","text":"","code":"get_api_key(key.name)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/get_api_key.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieve project API key if stored, if not, set and retrieve — get_api_key","text":"key.name character vector key name","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/get_api_key.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieve project API key if stored, if not, set and retrieve — get_api_key","text":"character vector","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/get_id_name.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the id name — get_id_name","title":"Get the id name — get_id_name","text":"Get id name","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/get_id_name.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the id name — get_id_name","text":"","code":"get_id_name(data)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/get_id_name.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the id name — get_id_name","text":"data data frame list","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/get_id_name.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the id name — get_id_name","text":"character vector","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/guess_time_only_filter.html","id":null,"dir":"Reference","previous_headings":"","what":"Try at determining which are true time only variables — guess_time_only_filter","title":"Try at determining which are true time only variables — guess_time_only_filter","text":"just try guessing data type based data class column names hoping tiny bit naming consistency. R include time-data format natively, \"hms\" class `readr` used. converted character class REDCap upload.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/guess_time_only_filter.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Try at determining which are true time only variables — guess_time_only_filter","text":"","code":"guess_time_only_filter( data, validate = FALSE, sel.pos = \"[Tt]i[d(me)]\", sel.neg = \"[Dd]at[eo]\" )"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/guess_time_only_filter.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Try at determining which are true time only variables — guess_time_only_filter","text":"data data set validate flag output validation data. output list. sel.pos Positive selection regex string sel.neg Negative selection regex string","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/guess_time_only_filter.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Try at determining which are true time only variables — guess_time_only_filter","text":"character vector list depending `validate` flag.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/guess_time_only_filter.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Try at determining which are true time only variables — guess_time_only_filter","text":"","code":"data <- redcapcast_data data |> guess_time_only_filter() #> [1] \"inclusion_time\" data |> guess_time_only_filter(validate = TRUE) |> lapply(head) #> $is.POSIX #> # A tibble: 6 × 2 #> inclusion_time event_datetime #> #> 1 12:38:49 NA #> 2 10:38:57 NA #> 3 NA NA #> 4 NA 2024-01-18 12:49:42 #> 5 12:01:07 NA #> 6 NA NA #> #> $is.datetime #> # A tibble: 6 × 1 #> event_datetime #> #> 1 NA #> 2 NA #> 3 NA #> 4 2024-01-18 12:49:42 #> 5 NA #> 6 NA #> #> $is.time_only #> # A tibble: 6 × 1 #> inclusion_time #> #> 1 12:38:49 #> 2 10:38:57 #> 3 NA #> 4 NA #> 5 12:01:07 #> 6 NA #>"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/hms2character.html","id":null,"dir":"Reference","previous_headings":"","what":"Change ","title":"Change ","text":"Change \"hms\" \"character\" REDCap upload.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/hms2character.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Change ","text":"","code":"hms2character(data)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/hms2character.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Change ","text":"data data set","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/hms2character.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Change ","text":"data.frame tibble","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/hms2character.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Change ","text":"","code":"data <- redcapcast_data ## data |> time_only_correction() |> hms2character()"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/html_tag_wrap.html","id":null,"dir":"Reference","previous_headings":"","what":"Simple html tag wrapping for REDCap text formatting — html_tag_wrap","title":"Simple html tag wrapping for REDCap text formatting — html_tag_wrap","text":"Simple html tag wrapping REDCap text formatting","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/html_tag_wrap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simple html tag wrapping for REDCap text formatting — html_tag_wrap","text":"","code":"html_tag_wrap(data, tag = \"h2\", extra = NULL)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/html_tag_wrap.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simple html tag wrapping for REDCap text formatting — html_tag_wrap","text":"data character vector tag character vector length 1 extra character vector","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/html_tag_wrap.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Simple html tag wrapping for REDCap text formatting — html_tag_wrap","text":"character vector","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/html_tag_wrap.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Simple html tag wrapping for REDCap text formatting — html_tag_wrap","text":"","code":"html_tag_wrap(\"Titel\", tag = \"div\", extra = 'class=\"rich-text-field-label\"') #> Titel<\/div> html_tag_wrap(\"Titel\", tag = \"h2\") #>
Titel<\/h2>"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/is_missing.html","id":null,"dir":"Reference","previous_headings":"","what":"Multi missing check — is_missing","title":"Multi missing check — is_missing","text":"Multi missing check","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/is_missing.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Multi missing check — is_missing","text":"","code":"is_missing(data, nas = c(\"\", \"NA\"))"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/is_missing.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Multi missing check — is_missing","text":"data character vector nas character vector strings considered NA","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/is_missing.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Multi missing check — is_missing","text":"logical vector","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/is_repeated_longitudinal.html","id":null,"dir":"Reference","previous_headings":"","what":"Test if repeatable or longitudinal — is_repeated_longitudinal","title":"Test if repeatable or longitudinal — is_repeated_longitudinal","text":"Test repeatable longitudinal","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/is_repeated_longitudinal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test if repeatable or longitudinal — is_repeated_longitudinal","text":"","code":"is_repeated_longitudinal( data, generics = c(\"redcap_event_name\", \"redcap_repeat_instrument\", \"redcap_repeat_instance\") )"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/is_repeated_longitudinal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test if repeatable or longitudinal — is_repeated_longitudinal","text":"data data set generics default \"redcap_event_name\", \"redcap_repeat_instrument\" \"redcap_repeat_instance\"","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/is_repeated_longitudinal.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test if repeatable or longitudinal — is_repeated_longitudinal","text":"logical","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/is_repeated_longitudinal.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test if repeatable or longitudinal — is_repeated_longitudinal","text":"","code":"is_repeated_longitudinal(c(\"record_id\", \"age\", \"record_id\", \"gender\")) #> [1] FALSE is_repeated_longitudinal(redcapcast_data) #> [1] TRUE is_repeated_longitudinal(list(redcapcast_data)) #> [1] TRUE"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/mark_complete.html","id":null,"dir":"Reference","previous_headings":"","what":"Completion marking based on completed upload — mark_complete","title":"Completion marking based on completed upload — mark_complete","text":"Completion marking based completed upload","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/mark_complete.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Completion marking based on completed upload — mark_complete","text":"","code":"mark_complete(upload, ls)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/mark_complete.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Completion marking based on completed upload — mark_complete","text":"upload output list `REDCapR::redcap_write()` ls output list `ds2dd_detailed()`","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/mark_complete.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Completion marking based on completed upload — mark_complete","text":"list `REDCapR::redcap_write()` results","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/mtcars_redcap.html","id":null,"dir":"Reference","previous_headings":"","what":"mtcars dataset slightly modified to use for Shiny app upload demonstration — mtcars_redcap","title":"mtcars dataset slightly modified to use for Shiny app upload demonstration — mtcars_redcap","text":"mtcars dataset slightly modified use Shiny app upload demonstration","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/mtcars_redcap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"mtcars dataset slightly modified to use for Shiny app upload demonstration — mtcars_redcap","text":"","code":"data(mtcars_redcap)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/mtcars_redcap.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"mtcars dataset slightly modified to use for Shiny app upload demonstration — mtcars_redcap","text":"data frame 13 variables: record_id ID, numeric mpg ID, numeric cyl ID, numeric disp ID, numeric hp ID, numeric drat ID, numeric wt ID, numeric qsec ID, numeric vs ID, numeric ID, numeric gear ID, numeric carb ID, numeric name original rownames, charater","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/process_user_input.character.html","id":null,"dir":"Reference","previous_headings":"","what":"User input processing character — process_user_input.character","title":"User input processing character — process_user_input.character","text":"User input processing character","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/process_user_input.character.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"User input processing character — process_user_input.character","text":"","code":"# S3 method for class 'character' process_user_input(x, ...)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/process_user_input.character.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"User input processing character — process_user_input.character","text":"x input ... ignored","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/process_user_input.character.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"User input processing character — process_user_input.character","text":"processed input","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/process_user_input.data.frame.html","id":null,"dir":"Reference","previous_headings":"","what":"User input processing data.frame — process_user_input.data.frame","title":"User input processing data.frame — process_user_input.data.frame","text":"User input processing data.frame","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/process_user_input.data.frame.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"User input processing data.frame — process_user_input.data.frame","text":"","code":"# S3 method for class 'data.frame' process_user_input(x, ...)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/process_user_input.data.frame.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"User input processing data.frame — process_user_input.data.frame","text":"x input ... ignored","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/process_user_input.data.frame.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"User input processing data.frame — process_user_input.data.frame","text":"processed input","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/process_user_input.default.html","id":null,"dir":"Reference","previous_headings":"","what":"User input processing default — process_user_input.default","title":"User input processing default — process_user_input.default","text":"User input processing default","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/process_user_input.default.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"User input processing default — process_user_input.default","text":"","code":"# Default S3 method process_user_input(x, ...)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/process_user_input.default.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"User input processing default — process_user_input.default","text":"x input ... ignored","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/process_user_input.default.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"User input processing default — process_user_input.default","text":"processed input","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/process_user_input.html","id":null,"dir":"Reference","previous_headings":"","what":"User input processing — process_user_input","title":"User input processing — process_user_input","text":"User input processing","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/process_user_input.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"User input processing — process_user_input","text":"","code":"process_user_input(x)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/process_user_input.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"User input processing — process_user_input","text":"x input","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/process_user_input.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"User input processing — process_user_input","text":"processed input","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/process_user_input.response.html","id":null,"dir":"Reference","previous_headings":"","what":"User input processing response — process_user_input.response","title":"User input processing response — process_user_input.response","text":"User input processing response","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/process_user_input.response.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"User input processing response — process_user_input.response","text":"","code":"# S3 method for class 'response' process_user_input(x, ...)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/process_user_input.response.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"User input processing response — process_user_input.response","text":"x input ... ignored","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/process_user_input.response.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"User input processing response — process_user_input.response","text":"processed input","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/read_input.html","id":null,"dir":"Reference","previous_headings":"","what":"Flexible file import based on extension — read_input","title":"Flexible file import based on extension — read_input","text":"Flexible file import based extension","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/read_input.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Flexible file import based on extension — read_input","text":"","code":"read_input(file, consider.na = c(\"NA\", \"\\\"\\\"\", \"\"))"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/read_input.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Flexible file import based on extension — read_input","text":"file file name consider.na character vector strings consider NAs","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/read_input.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Flexible file import based on extension — read_input","text":"tibble","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/read_input.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Flexible file import based on extension — read_input","text":"","code":"read_input(\"https://raw.githubusercontent.com/agdamsbo/cognitive.index.lookup/main/data/sample.csv\") #> Rows: 28 Columns: 8 #> ── Column specification ──────────────────────────────────────────────────────── #> Delimiter: \",\" #> dbl (8): id, ab, age, imm, vis, ver, att, del #> #> ℹ Use `spec()` to retrieve the full column specification for this data. #> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message. #> # A tibble: 28 × 8 #> id ab age imm vis ver att del #> #> 1 1 1 74 38 35 30 29 35 #> 2 1 2 69 36 36 21 27 37 #> 3 2 1 63 32 31 26 34 38 #> 4 2 2 64 37 34 26 36 46 #> 5 3 1 69 39 33 31 47 29 #> 6 3 2 70 40 36 31 46 25 #> 7 4 1 79 44 37 20 37 36 #> 8 4 2 81 35 36 31 37 40 #> 9 5 1 77 35 26 17 20 36 #> 10 5 2 80 29 34 18 23 36 #> # ℹ 18 more rows"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/read_redcap_instrument.html","id":null,"dir":"Reference","previous_headings":"","what":"Convenience function to download complete instrument, using token storage in keyring. — read_redcap_instrument","title":"Convenience function to download complete instrument, using token storage in keyring. — read_redcap_instrument","text":"Convenience function download complete instrument, using token storage keyring.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/read_redcap_instrument.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convenience function to download complete instrument, using token storage in keyring. — read_redcap_instrument","text":"","code":"read_redcap_instrument( key, uri, instrument, raw_or_label = \"raw\", id_name = \"record_id\", records = NULL )"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/read_redcap_instrument.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convenience function to download complete instrument, using token storage in keyring. — read_redcap_instrument","text":"key key name standard keyring token retrieval. uri REDCap database API uri instrument instrument name raw_or_label raw label passed `REDCapR::redcap_read()` id_name id variable name. Default \"record_id\". records specify records download. Index numbers. Numeric vector.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/read_redcap_instrument.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convenience function to download complete instrument, using token storage in keyring. — read_redcap_instrument","text":"data.frame","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 downloading specified fields, forms /events using built-focused_metadata including clean-. Works classical longitudinal projects without 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\" )"},{"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 API 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 .","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( data, 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":"data 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":"# Longitudinal list1 <- 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(list1) #> Joining with `by = join_by(record_id)` #> record_id age_baseline age_followup gender #> 1 1 25 27 male #> 2 2 26 28 female # Simpel with two instruments list2 <- list( data.frame( record_id = c(1, 2), age = c(25, 26) ), data.frame( record_id = c(1, 2), gender = c(\"male\", \"female\") ) ) redcap_wider(list2) #> Joining with `by = join_by(record_id)` #> record_id age gender #> 1 1 25 male #> 2 2 26 female # Simple with single instrument list3 <- list(data.frame( record_id = c(1, 2), age = c(25, 26) )) redcap_wider(list3) #> record_id age #> 1 1 25 #> 2 2 26 # Longitudinal with repeatable instruments list4 <- 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, 1, 1, 1, 2, 2, 2, 2), redcap_event_name = c( \"baseline\", \"baseline\", \"followup\", \"followup\", \"baseline\", \"baseline\", \"followup\", \"followup\" ), redcap_repeat_instrument = \"walk\", redcap_repeat_instance = c(1, 2, 1, 2, 1, 2, 1, 2), dist = c(40, 32, 25, 33, 28, 24, 23, 36) ), data.frame( record_id = c(1, 2), redcap_event_name = c(\"baseline\", \"baseline\"), gender = c(\"male\", \"female\") ) ) redcap_wider(list4) #> Joining with `by = join_by(record_id)` #> Joining with `by = join_by(record_id)` #> record_id age_baseline age_followup dist_1_baseline dist_1_followup #> 1 1 25 27 40 25 #> 2 2 26 28 28 23 #> dist_2_baseline dist_2_followup gender #> 1 32 33 male #> 2 24 36 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 inclusion_time Inclusion time, hms 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 Categorical score, numeric mrs_complete Complete, numeric event_datetime Event datetime, POSIXct event_age Age time event, numeric 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/replace_curly_quote.html","id":null,"dir":"Reference","previous_headings":"","what":"Replace curly apostrophes and quotes from word — replace_curly_quote","title":"Replace curly apostrophes and quotes from word — replace_curly_quote","text":"Copied textclean, updated since 2018 CRAN. Github:https://github.com/trinker/textclean","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/replace_curly_quote.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replace curly apostrophes and quotes from word — replace_curly_quote","text":"","code":"replace_curly_quote(x)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/replace_curly_quote.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replace curly apostrophes and quotes from word — replace_curly_quote","text":"x character vector","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/replace_curly_quote.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Replace curly apostrophes and quotes from word — replace_curly_quote","text":"character vector","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(\"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/shiny_cast.html","id":null,"dir":"Reference","previous_headings":"","what":"Launch the included Shiny-app for database casting and upload — shiny_cast","title":"Launch the included Shiny-app for database casting and upload — shiny_cast","text":"Wraps shiny::runApp()","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/shiny_cast.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Launch the included Shiny-app for database casting and upload — shiny_cast","text":"","code":"shiny_cast(...)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/shiny_cast.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Launch the included Shiny-app for database casting and upload — shiny_cast","text":"... Arguments passed shiny::runApp()","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/shiny_cast.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Launch the included Shiny-app for database casting and upload — shiny_cast","text":"shiny app","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/shiny_cast.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Launch the included Shiny-app for database casting and upload — shiny_cast","text":"","code":"# shiny_cast()"},{"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/reference/time_only_correction.html","id":null,"dir":"Reference","previous_headings":"","what":"Correction based on time_only_filter function — time_only_correction","title":"Correction based on time_only_filter function — time_only_correction","text":"Correction based time_only_filter function","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/time_only_correction.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Correction based on time_only_filter function — time_only_correction","text":"","code":"time_only_correction(data, ...)"},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/time_only_correction.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Correction based on time_only_filter function — time_only_correction","text":"data data set ... arguments passed `guess_time_only_filter()`","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/time_only_correction.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Correction based on time_only_filter function — time_only_correction","text":"tibble","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/reference/time_only_correction.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Correction based on time_only_filter function — time_only_correction","text":"","code":"data <- redcapcast_data ## data |> time_only_correction()"},{"path":"https://agdamsbo.github.io/REDCapCAST/news/index.html","id":"redcapcast-24111","dir":"Changelog","previous_headings":"","what":"REDCapCAST 24.11.1","title":"REDCapCAST 24.11.1","text":"Revised tests. Documentation slightly updated highlight shiny app casting REDCap metadata. working hosting Shiny Server.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/news/index.html","id":"functions-24-11-1","dir":"Changelog","previous_headings":"","what":"Functions:","title":"REDCapCAST 24.11.1","text":"Bug: ‘form.name’ specified ‘ds2dd_detailed()’ ignored. Corrected ignored ‘form.sep’ specified. Added handling re-occurring form.sep pattern. New: export_redcap_instrument() new version create_instrument_meta(), export single instrument. Multiple instrument export can done lapply() purrr::map(). allows inclusion functionality Shiny implementation easier handle. create_instrument_meta() deprecated. Improved: shiny_cast() app updated actually work install package clones whole repository.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/news/index.html","id":"shiny-24-11-1","dir":"Changelog","previous_headings":"","what":"Shiny:","title":"REDCapCAST 24.11.1","text":"New: Major overhaul app interface introduction bslib building page. Also Detailed documentation added app workflow. New: Export REDCap instrument ready add database based uploaded spreadsheet. thanks export_redcap_instrument() function. functionality intended projects production adding instruments handled manually API upload. Bug: Export datadictionary “” instead “NA” NAs. Upload REDCap failed. anymore. shiny implementation included package. Implementing shinylive may looked later.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/news/index.html","id":"redcapcast-24103","dir":"Changelog","previous_headings":"","what":"REDCapCAST 24.10.3","title":"REDCapCAST 24.10.3","text":"CRAN release: 2024-10-03 Updated links spelling.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/news/index.html","id":"redcapcast-24101","dir":"Changelog","previous_headings":"","what":"REDCapCAST 24.10.1","title":"REDCapCAST 24.10.1","text":"Minor changes pass tests renv . rhub really running smooth previously.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/news/index.html","id":"redcapcast-2461","dir":"Changelog","previous_headings":"","what":"REDCapCAST 24.6.1","title":"REDCapCAST 24.6.1","text":"CRAN release: 2024-06-07","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/news/index.html","id":"functions-24-6-1","dir":"Changelog","previous_headings":"","what":"Functions","title":"REDCapCAST 24.6.1","text":"Fix: read_redcap_tables(): field names testing allows include “[form_name]_complete” fields. Fix: ds2dd_detailed(): default record ID name now “record_id”, REDCap default. Default still use first column name. Support added interpret column name prefix suffix instrument names. See examples. New: create_instrument_meta(): creates zip instrument files allow adding new instruments project production. Takes data dictionary input creates zip instrument specified form_name column. New: doc2dd(): function convert document table data dictionary. allows specify instrument whole data dictionary text document, easier work easily modifiable. generic case data frame variable names values column. format like REDCap data dictionary, gives options formatting. related functions data handling formatting. One interesting function case_match_regex_list(), allows dynamic dplyr::case_when()-like approach regex-matching. think neat least.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/news/index.html","id":"documentation-and-more-24-6-1","dir":"Changelog","previous_headings":"","what":"Documentation and more","title":"REDCapCAST 24.6.1","text":"Dependencies: order deploy shiny_cast() shinylive, need remove curl dependency. accomplish , shiny_deploy() helper functions moved package project.aid. realising REDCapR curl dependency, culprit. REDCapCAST going shinylive web-app without removing REDCapR dependency REDCap database interaction, defy purpose. ’ll stick hosted Shiny app instead.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/news/index.html","id":"redcapcast-2421","dir":"Changelog","previous_headings":"","what":"REDCapCAST 24.2.1","title":"REDCapCAST 24.2.1","text":"CRAN release: 2024-02-28","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/news/index.html","id":"functions-24-2-1","dir":"Changelog","previous_headings":"","what":"Functions","title":"REDCapCAST 24.2.1","text":"Fix: ds2dd(): uses correct default dd column names. deprecated. Fix: easy_redcap(): fixed actually allow project naming. also specifically asks uri. widening updated work. Fix: redcap_wider(): updated accept formats allow handling simple projects without repeating instruments longitudinal. Fix: read_redcap_tables(): now handles non-longitudinal project without repeatable instruments. NEW: ds2dd_detailed(): extension ds2dd(), serves preserve much metadata possible automatically. Depends group helper functions also introduced. special note guess_time_only_filter(), try guess columns/variables formatted time formats. Supports hms time format. DETAILED INSTRUCTION VIGNETTE PENDING. NEW: read_redcap_instrument(): convenience function retrieve complete instrument. Goes little focused approach. REDCapR::redcap_read() can specify form download. also specify record id variable though. done read_redcap_instrument(). Nothing fancy. NEW: shiny_cast(): Shiny application ease process converting spreadsheet/data set REDCap database. app runs locally data transferred securely. can just create upload data dictionary, can also transfer given data process. plan host app shinyapps.io, now can run locally.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/news/index.html","id":"other-24-2-1","dir":"Changelog","previous_headings":"","what":"Other","title":"REDCapCAST 24.2.1","text":"believe renv now added runs correctly. clone, renv::restore() install necessary package modify package. seems always back forth. renv may way . Added Code Conduct.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/news/index.html","id":"redcapcast-2411","dir":"Changelog","previous_headings":"","what":"REDCapCAST 24.1.1","title":"REDCapCAST 24.1.1","text":"CRAN release: 2024-01-09","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/news/index.html","id":"functions-24-1-1","dir":"Changelog","previous_headings":"","what":"Functions","title":"REDCapCAST 24.1.1","text":"Fix: read_redcap_tables(): checking form names based data dictionary allow handling non-longitudinal projects. Prints invalid form names invalid event names. invalid form names supplied REDCapR::redcap_read() (backbone), forms exported, want focused approach. Invalid event names give output rather peculiar formatting. Checking field names validity also added.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/news/index.html","id":"redcapcast-23121","dir":"Changelog","previous_headings":"","what":"REDCapCAST 23.12.1","title":"REDCapCAST 23.12.1","text":"CRAN release: 2023-12-20 One new function ease secure dataset retrieval bug fixes.","code":""},{"path":"https://agdamsbo.github.io/REDCapCAST/news/index.html","id":"functions-23-12-1","dir":"Changelog","previous_headings":"","what":"Functions","title":"REDCapCAST 23.12.1","text":"New: easy_redcap() function ease retrieval dataset read_redcap_tables() keyring-package based key storage, handles secure API set, storage retrieval. Relies small helper function, get_api_key(), wraps relevant keyring-functions. Includes option cast data wide format flag widen.data. Fix: REDCap_split(): using function , supplying data set check boxes fail metadata supplied tibble. Metadata now converted data.frame. Fixed. Fix: read_redcap_tables(): fixed bug supplying events.","code":""},{"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":"CRAN release: 2023-07-04 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":""}]