R thing I didn’t know until today: | doesn’t short circuit || does.
# this will die with an error when some.val is null because it can't compare a null value to n.
is.null(some.val) | (some.val > n)
# but if you use the short circuiting OR then as the first part of the expression is true it doesn't bother to evaluate the second part, so it works fine when some.val is null
is.null(some.val) || (some.val > n)