Classification in trialdiff is transparent and rule-based. A rule is a
named predicate evaluated against the long change register produced by
as_register(). Rules are applied in priority order; the first matching rule
determines the primary category, while every matched rule is retained in the
category_all column so that nothing is hidden.
Arguments
- name
Stable machine-readable category name (snake_case).
- label
Human-readable category label.
- test
A function
function(register, context)returning a logical vector the same length asnrow(register).- priority
Integer priority; lower values are evaluated first.
- reason
Optional function
function(register, context)returning a character vector of explanations.- description
Optional longer description.
