| sf_check | R Documentation |
Specifies an attention, instructional, or trap check item at instrument
design time. The check is stored in the instrument object and evaluated
against collected response data by quality_report(). This function only
defines the check. Evaluation happens later in quality_report().
sf_check(
id,
item_id,
type = c("attention", "instructional", "trap"),
pass_values = NULL,
fail_action = c("flag", "exclude"),
label = NULL,
notes = NULL
)
id |
Character. A unique identifier for this check. |
item_id |
Character. The |
type |
Character. The check type. One of:
|
pass_values |
Vector or NULL. The response value or values that
constitute a pass. For |
fail_action |
Character. What |
label |
Character or NULL. An optional human-readable label for the check, used in the quality report. |
notes |
Character or NULL. Optional free-text notes about the purpose or rationale of this check. |
An object of class sf_check (a named list).
sf_item(), sf_instrument(), quality_report()
# An attention check: respondent must select 4
chk <- sf_check(
id = "attn_1",
item_id = "attention_check_q",
type = "attention",
pass_values = 4,
fail_action = "flag",
label = "Attention check 1"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.