Define one category of a codebook
Usage
cb_category(
label,
definition,
include = NULL,
exclude = NULL,
examples = NULL,
counterexamples = NULL
)Arguments
- label
The label the coder (human or model) assigns. Keep it short and machine-friendly; it is matched verbatim (then case-insensitively) when parsing model output.
- definition
What the category means, in one or two sentences.
- include
Optional character vector of terms or rules for when this category applies.
- exclude
Optional character vector of terms or rules for when this category does not apply.
- examples
Optional verbatim examples that belong to the category.
- counterexamples
Optional near-misses that do not.
Examples
cb_category(
"populist",
"Frames politics as a struggle between the virtuous people and a corrupt elite.",
include = "Attacks on 'the elite' or 'the establishment' as a class.",
exclude = "Criticism of a named politician without people-vs-elite framing.",
examples = "Brussels bureaucrats have never done an honest day's work."
)