Skip to contents

Given a REDCap data dictionary, enumerate every text field in that data dictionary along with validation types, min, and max, and append a text_validation_type (tvt) function name, weight, mean, and standard deviation as needed.

Usage

get_text_fields(metadata)

Arguments

metadata

A REDCap data dictionary

Value

a dataframe with these columns

field_name

REDCap field name

form_name

REDCap form name

field_type

REDCap field type

text_validation_type

REDCap text validation type

text_validation_min

REDCap text validation min

text_validation_max

REDCap text validation max

tvt

text validation type function name

weight

a default weight for the field

mean

mean of data to be generated derived from the min and max

sd

standard deviation of data to be generated derived from the min and max

Examples

if (FALSE) { # \dontrun{
text_fields <-
  get_text_fields(metadata_to_populate)
} # }