Learn R Programming

functools (version 0.2.0)

Orify: Predicate function operator that creates new predicate functions linked by the || operator.

Description

Predicate function operator that creates new predicate functions linked by the || operator.

Usage

Orify(...)

Arguments

...
n functions to apply in order from left to right

Value

A predicate function linked by the || operator.

See Also

Andify to create new predicate functions linked by the && operator.

Other predicate function operators: Andify

Examples

Run this code
# Examples
is_character_or_factor <- Orify(is.character, is.factor)
is_character_or_factor(letters) # TRUE
is_character_or_factor(factor(state.abb)) # TRUE
is_character_or_factor(1:100) # FALSE

Run the code above in your browser using DataLab