set_test: Set test units

View source: R/create_units.r

set_testR Documentation

Set test units

Description

Setup test units (also known as gold units). If the answer/annotation is wrong, coders receive damage. Note that which units are test units needs to be indicated with the 'type' argument in create_units.

Usage

set_test(
  variable,
  value,
  field = NULL,
  damage = 0,
  on_wrong = NULL,
  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).

damage

The amount of damage a coder should receive. Can be a number or an expression that returns a number.

on_wrong

A markdown string that will be displayed when a coder gives an incorrect answer. If not given, no message will be displayed. Can also be the name of a column (in create_units) for unit specific messages.

operator

How should the annotation value be compared to the column value? Default is "==" (equals). Alternatives are "!=" (not equals), "<=", "<", ">=" or ">".

Value

A list of test units


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