Implementation of passed on to REDCap_split with a focused data acquisition approach using passed on to redcap_read and only downloading specified fields, forms and/or events using the built-in focused_metadata including some clean-up. Works with classical and longitudinal projects with or without repeating instruments. Will preserve metadata in the data.frames as labels.
read_redcap_tables(
uri,
token,
records = NULL,
fields = NULL,
events = NULL,
forms = NULL,
raw_or_label = c("raw", "label", "both"),
split_forms = c("all", "repeating", "none"),
...
)
list of instruments
REDCap database API uri
API token
records to download
fields to download
events to download
forms to download
raw or label tags. Can be "raw", "label" or "both".
* "raw": Standard redcap_read method to get raw values. * "label": Standard redcap_read method to get label values. * "both": Get raw values with REDCap labels applied as labels. Use as_factor to format factors with original labels and use the `gtsummary` package functions like tbl_summary to easily get beautiful tables with original labels from REDCap. Use fct_drop to drop empty levels.
Whether to split "repeating" or "all" forms, default is all. Give "none" to export native semi-long REDCap format
passed on to redcap_read
# Examples will be provided later
Run the code above in your browser using DataLab