unique_max: unique_max

View source: R/unique_max.R

unique_maxR Documentation

unique_max

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: minimal distance between largest and the second largest value (default: 1e-3)

Value

logical

Examples

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

sigbertklinke/exams2moodle documentation built on July 6, 2023, 3:26 p.m.