top_indices | R Documentation |
Returns the positions of the n
highest values in x
. For equal values, it maintains the original order.
top_indices(x, n = 3, top = TRUE)
x |
A vector. |
n |
The number of highest values to return. |
top |
Whether to return the |
A vector of indices.
top_indices(rnorm(10), n = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.