Helper to style results of a predicate on value
theme_color_from_pred.RdReturns success if TRUE, danger if FALSE,
and applies no styling if NULL.
Arguments
- .x
A list or atomic vector.
- .p
A predicate function (i.e. a function that returns either
TRUEorFALSE) specified in one of the following ways:A named function, e.g.
is.character.An anonymous function, e.g.
\(x) all(x < 0)orfunction(x) all(x < 0).A formula, e.g.
~ all(.x < 0). You must use.xto refer to the first argument). Only recommended if you require backward compatibility with older versions of R.
See also
Other helpers:
module2app2()