set_train: Set training units

View source: R/create_units.r

set_trainR Documentation

Set training units

Description

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

Usage

set_train(
  variable,
  value,
  field = NULL,
  message = NULL,
  submessage = NULL,
  damage = 0,
  operator = "=="
)

Arguments

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: "### You gave an incorrect answer.\n\nThis is a **training** unit. \nPlease have another look and select a different answer".

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 ">".

Value

A list of training units


ccs-amsterdam/ccsAnnotator documentation built on March 19, 2024, 2:14 a.m.