code: Create a code

View source: R/codes.r

codeR Documentation

Create a code

Description

Create a code

Usage

code(code, ..., color = NULL, makes_irrelevant = NULL, required_for = NULL)

Arguments

code

The name of the code

...

Optionally, nested codes for children

color

Optionally, the color of the code

makes_irrelevant

Optionally, a character vector of question names that become irrelevant if this code is the selected answer. Can also be "REMAINING" to make all questions after the current one irrelevant.

required_for

Optionally, a character vector of question names. If this code is not selected, all these questions become irrelevant. Can also be "REMAINING" for all questions after the current.

Value

A annotatorCode object, to be used inside the codes function

Examples

code("yes", color = "green")
code("no", color = "red")

# nested codes
code(
  "actor",
  code(
    "government",
    code("president"),
    code("vice-president")
  ),
  code("media"),
  code("society")
)

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