Learn R Programming

QuantileGH (version 0.1.8)

allequal: Determine Nearly-Equal Elements

Description

Determine nearly-equal elements and extract non-nearly-equal elements in a double vector.

Usage

unique_allequal(x, ...)

duplicated_allequal(x, ...)

Value

Function duplicated_allequal() returns a logical

vector of the same length as the input vector, indicating whether each element is nearly-equal to any of the previous elements.

Function unique_allequal() returns the non-nearly-equal elements in the input vector.

Arguments

x

double vector

...

additional parameters of function allequal_o_()

See Also

Examples

Run this code
(x = c(.3, 1-.7, 0, .Machine$double.eps))
duplicated.default(x) # not desired
unique.default(x) # not desired
duplicated_allequal(x)
unique_allequal(x)
unique_allequal(x, tol = .Machine$double.eps/2)

Run the code above in your browser using DataLab