sortIndex: sortIndex

Description Usage Arguments Value Examples

View source: R/utils.R

Description

sort each column of the given matrix X (default in the ascending order)

Usage

1
sortIndex(X, decrease = F)

Arguments

X

a matrix/vector to be sorted

decrease

sorted in ascending or descending order, default is FALSE

Value

the sorted indices for each column vector

Examples

1
2
sortIndex(c(2,-1,0), decrease = TRUE)
sortIndex(cbind(c(2,3,1), c(5,10,-1)))

wenda-1121/RHP documentation built on Feb. 18, 2020, 9:36 p.m.