unique_max {exams.forge}R Documentation

Unique Maximum

Description

Checks if x has a unique maximum. The largest and the second largest value must have at least a distance of tol.

Usage

unique_max(x, tol = 0.001)

Arguments

x

numeric: values to check

tol

numeric: minimum distance between the largest and the second largest value (default: 1e-3)

Value

Logical

Examples

x <-runif(100)
unique_max(x)
unique_max(x, tol=0.1)

[Package exams.forge version 1.0.10 Index]