Learn R Programming

VBmix (version 0.2.8)

sort_index: sort_index

Description

returns indexes associated to the sorted values of the parameter vector.

Usage

sort_index(vec, order = 0)

Arguments

vec
vector to be sorted.
order
if 0, ascending order, if 1, descending order.

Value

  • indexes associated to the sorted input vector.

Examples

Run this code
temp <- rnorm(10)
temp2 <- sort_index(temp)

Run the code above in your browser using DataLab