Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

sort_index

sort_index


Description

For a given vector, return the indexes of the sorted array and not the sorted array itself.

Usage

sort_index(vec, ascending = TRUE)

Arguments

vec

numeric vector

ascending

logical, order to return (ascending or descending), default = True

Value

numeric vector containing sorted indexes

Examples

v <- c(10,3,1,4)
j <- sort_index(v)

superml

Build Machine Learning Models Like Using Python's Scikit-Learn Library in R

v0.5.3
GPL-3 | file LICENSE
Authors
Manish Saraswat [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.