View source: R/make_yes_no_unknown.R
make_yes_no_unknown | R Documentation |
Convert a "Yes-No", "True-False" or "Checkboxes (Multiple
Answers)" question in REDCap to a factor holding "No" or
"Yes" or "Unknown". Technically "yes" or "checked" (ignoring case), 1 or
TRUE responses are converted to "Yes". "No" or "unchecked" (ignoring
case), 0 or FALSE are converted to "No". All other values are set to
"Unknown". Also see make_yes_no()
.
make_yes_no_unknown(x)
x |
variable to be converted to hold "No", "Yes", or Unknown" |
a factor with "No", "Yes", or Unknown"
make_yes_no_unknown(c(0, 1, NA))
make_yes_no_unknown(c("unchecked", "Checked", NA))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.