n_max | R Documentation |
Returns the n maximum or n minimum values of a vector.
n_max(vec, n = 5)
n_min(vec, n = 5)
vec |
A vector from which to select the max or min values. |
n |
The number of values to return. |
The n max or min values of your vector.
Emily E. Burke
x <- rnorm(100)
n_max(x)
n_min(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.