sort_index | R Documentation |
For a given vector, return the indexes of the sorted array and not the sorted array itself.
sort_index(vec, ascending = TRUE)
vec |
numeric vector |
ascending |
logical, order to return (ascending or descending), default = True |
numeric vector containing sorted indexes
v <- c(10,3,1,4)
j <- sort_index(v)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.