Last chance! 50% off unlimited learning
Sale ends in
Simplifying math functions are simple wrappers of math function (- +). If any of the left-hand side or right-hand side is NA, Inf or NaN it returns any rational value, if there is any.
However, if the both values are irrational it returns NA. The result is then passed to the corresponding math function.
.x %minus_% .y.x %plus_% .y
a single value
numeric or integer element
numeric or integer element
vignette("s")
, vignette("hablar")
if (FALSE) # The simplest case
3 %minus_% 2
# But with NA it returns 3 as if the NA were zero
3 %minus_% NA
# It doesnt matter if the irrational number is on left- or right-hand.
NA %plus_% 5
Run the code above in your browser using DataLab