powered by
Check which values are in a numeric series
has_discretes(x, values, ..., tol = sqrt(.Machine$double.eps))
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.
x
NA
values
Numeric series (numeric vector or object of class "discretes").
numeric
"discretes"
A vector of values to check.
Reserved for future extensions; must be empty.
Numerical tolerance when checking if a value is in the series. Single non-negative numeric. See next_discrete() for details.
next_discrete()
has_discretes(natural0(), c(-1, 0, 1, 12.5, NA)) has_discretes(1 / natural1(), 0)
Run the code above in your browser using DataLab