grapes-00-grapes: Rose tinted infix

%00%R Documentation

Rose tinted infix

Description

When your functions wear these rose tinted glasses, the world will appear to be a nicer, fluffier place.

Usage

x %00% y

Arguments

x

If (an element of) x is any of Inf,-Inf,NA,NaN,NULL,length(x)==0, it will return/replace the value of y; otherwise x.

y

The value to return/replace for x in case of catastrophe >00<

Author(s)

Fred Hasselman

See Also

purrrr::%||%

Examples


Inf %00% NA

numeric(0) %00% ''

NA %00% 0

NaN %00% NA
c(1, NaN) %00% NA

NULL %00% NA
c(1, NULL) %00% NA # can't see second element


FredHasselman/invctr documentation built on Feb. 19, 2025, 5:12 a.m.