sort_index: sort_index

Description Usage Arguments Value Examples

View source: R/RcppExports.R

Description

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

Usage

1
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

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

superml documentation built on April 28, 2020, 9:05 a.m.