Check which values are in a numeric series
Usage
has_discretes(x, values, ..., tol = sqrt(.Machine$double.eps))Arguments
- x
Numeric series (
numericvector or object of class"discretes").- values
A vector of values to check.
- ...
Reserved for future extensions; must be empty.
- tol
Numerical tolerance when checking if a value is in the series. Single non-negative numeric. See
next_discrete()for details.
Value
A logical vector indicating whether each value is in the numeric
series x. NA values are preserved such that NA in values results
in NA in the output.
Note
This function does not distinguish between +0 and -0. For that,
use has_negative_zero() or has_positive_zero().
