n_functions: Get more than just the single max or single min value with...

n_maxR Documentation

Get more than just the single max or single min value with n_max() and n_min()

Description

Returns the n maximum or n minimum values of a vector.

Usage

n_max(vec, n = 5)

n_min(vec, n = 5)

Arguments

vec

A vector from which to select the max or min values.

n

The number of values to return.

Value

The n max or min values of your vector.

Author(s)

Emily E. Burke

Examples


x <- rnorm(100)
n_max(x)
n_min(x)

LieberInstitute/jaffelab documentation built on April 1, 2024, 7:26 a.m.