cb_create_redcap_options() includes:
name = field_name,
var_label = field_label,
val_labels = select_choices_or_calculations,
type = field_type,
form = form_name
Plus, integer coercion depends on text_validation_type_or_show_slider_number, which is hard-coded. But it seems like these names aren't consistent. eg for a recent project, had to use
cb_create_redcap_options(
name = `Variable / Field Name`,
var_label = `Field Label`,
val_labels = `Choices, Calculations, OR Slider Labels`,
type = `Field Type`,
form = `Form Name`
)
and had to manually rename field Text Validation Type OR Show Slider Number to text_validation_type_or_show_slider_number. (This threw an error even when coerce_integers = FALSE, which may also bear looking into.)
Need to learn more about what names can actually be included in dictionary / how much variability there is.
cb_create_redcap_options()includes:Plus, integer coercion depends on
text_validation_type_or_show_slider_number, which is hard-coded. But it seems like these names aren't consistent. eg for a recent project, had to usecb_create_redcap_options( name = `Variable / Field Name`, var_label = `Field Label`, val_labels = `Choices, Calculations, OR Slider Labels`, type = `Field Type`, form = `Form Name` )and had to manually rename field
Text Validation Type OR Show Slider Numbertotext_validation_type_or_show_slider_number. (This threw an error even whencoerce_integers = FALSE, which may also bear looking into.)Need to learn more about what names can actually be included in dictionary / how much variability there is.