which_max_n: Return the indices of n maximum or minimum values

Description Usage Arguments Value Examples

Description

Return the indices of n maximum or minimum values

Usage

1
2
3
which_max_n(x, n = 1)

which_min_n(x, n = 1)

Arguments

x

:: (numeric())
an numeric vector

n

:: (integer(1))
number of values to return.

Value

an integer() vector.

Examples

1
2
which_max_n(1:4, 2)
which_min_n(1:4, 2)

dymium-org/dymiumCore documentation built on July 18, 2021, 5:10 p.m.