View source: R/REDCap_codebook_prepare.R
| REDCap_codebook_prepare | R Documentation |
Cleans HTML formatting from codebook labels and optionally filters the codebook to selected REDCap forms.
REDCap_codebook_prepare(
codebook,
strings_to_ignore = codebook_strings_to_ignore,
form.filter = NULL,
field.label = `Field Label`,
form.col = `Form Name`
)
codebook |
A REDCap data dictionary as a data frame. |
strings_to_ignore |
A regular expression used in
|
form.filter |
Optional character vector of REDCap form names to keep. |
field.label |
Unquoted column containing question labels. |
form.col |
Unquoted column containing the form name (for filtering) |
A cleaned codebook tibble/data frame.
codebook_path <- system.file("ext", "DataDictionary_sleepdiary.csv",
package = "melidosData"
)
codebook <- utils::read.csv(codebook_path, check.names = FALSE)
cleaned <- REDCap_codebook_prepare(codebook)
cleaned$`Field Label`
#compate the original one
codebook$`Field Label`
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.