Check numeric objects:
is_odd(x)is_even(x)
is_positive(x, strict = FALSE)
is_whole(x, tolerance = .Machine$double.eps^0.5)
is_binary(x)
A numeric object to be tested.
A logical scalar: should missing values
(including NaN) be omitted?
A numeric scalar giving the
tolerance to check within.
A logical vector.
is_odd and is_even check if a number is odd or even,
respectively.
is_positive checks if an object contains only (strictly) positive
numbers.
is_binary checks if an object contains only \(0\)s and \(1\)s.
is_whole checks if an object only contains whole numbers.
Other predicates:
predicate-graph,
predicate-matrix,
predicate-scalar,
predicate-trend,
predicate-type,
predicate-utils