Optionally the message can signal failure if the diagnostic is above/below a certain threshold or is NA.

numeric_diagnostic(
  label,
  report = NULL,
  error_above = Inf,
  error_below = -Inf,
  allow_na = FALSE,
  label_short = NULL,
  hint = "",
  digits = 2,
  unit = ""
)

Arguments

label

a description of the diagnostic

report

what value shuld be reported to represent the diagnostic. Support options are "min", "max" and "quantiles"

error_above

signal a problem when the diagnostic is above this value

error_below

signal a problem when the diagnostic is below this value

allow_na

if FALSE, any NA values are reported as a problem

label_short

a shorter version of the label (if the original is long) for cleaner summaries.

hint

A suggestion what the user can do if problems are signalled

digits

decimal digits to report

unit

optional unit to report alongside the values