View source: R/REDCap_attention_check.R
| REDCap_attention_check | R Documentation |
Replaces a column with a logical pass/fail value based on membership in
condition, sets a label attribute, and moves the column to the end.
REDCap_attention_check(
data,
check.column,
condition,
label = "Attention check successful"
)
data |
A data frame. |
check.column |
Unquoted column to evaluate. |
condition |
Vector of accepted responses. |
label |
Label to attach to the resulting logical column. |
data with an updated attention check column.
dat <- data.frame(attention = c("A", "B", "A"))
REDCap_attention_check(dat, attention, condition = "A")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.