Skip to contents

Returns success if TRUE, danger if FALSE, and applies no styling if NULL.

Usage

theme_color_from_pred(.x, .p)

Arguments

.x

A list or atomic vector.

.p

A predicate function (i.e. a function that returns either TRUE or FALSE) specified in one of the following ways:

  • A named function, e.g. is.character.

  • An anonymous function, e.g. \(x) all(x < 0) or function(x) all(x < 0).

  • A formula, e.g. ~ all(.x < 0). You must use .x to refer to the first argument). Only recommended if you require backward compatibility with older versions of R.

See also

Other helpers: module2app2()