| funlogic {infix} | R Documentation |
Function Logical Operators
Description
Creates a function which returns the corresponding logical
operation between what f1 and f2 return.
Usage
f1 %&% f2
f1 %|% f2
f1 %xor% f2
Arguments
f1, f2 |
Arbitrary predicate functions. |
Details
To obtain the logical negation of what a function f returns,
use base function Negate.
Examples
is.null.na <- is.null %|% is.na
all(is.null.na(NA), is.null.na(NULL)) # returns TRUE
[Package infix version 0.1.0 Index]