set_train | R Documentation |
Setup training units, and provide the correct answers/annotations for these
units. If the answer/annotation is wrong, coders will see a message and need
to retry. Note that which units are train units needs to be indicated with
the 'type' argument in create_units
set_train(
variable,
value,
field = NULL,
message = NULL,
submessage = NULL,
damage = 0,
operator = "=="
)
variable |
The name of the variable as used in the codebook. If not specified, the name of the column will be used. |
value |
The value to which the given answer will be compared. Either a single string or the name of a column (in create_units). |
field |
Optionally, the name of a field (in case of a field specific annotation). |
message |
A markdown string that will be displayed when the given
answer does not match value. If not given, the message will be: |
submessage |
An additional unit-specific message to display beneath the general message. This argument takes an expression, so you can refer to a column in the data (in create_units), and use other columns to create a custom message. |
damage |
The amount of damage a coder should receive. Can be a number or an expression that returns a number. |
operator |
How should the annotation value be compared to the column value? Default is "==" (equals). Alternatives are "!=" (not equals), "<=", "<", ">=" or ">". |
A list of training units
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.