funlogic: Function Logical Operators

Description Usage Arguments Details Examples

Description

Creates a function which returns the corresponding logical operation between what f1 and f2 return.

Usage

1
2
3
4
5
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

1
2
is.null.na <- is.null %|% is.na
all(is.null.na(NA), is.null.na(NULL)) # returns TRUE

ebeneditos/infix documentation built on Jan. 18, 2020, 10:37 p.m.