sortByRanking: Sort a vector or list via a given ranking

Description Usage Arguments Value

View source: R/list_utils.r

Description

Reorders a vector or list according to a given ranking ranking.

Usage

1
sortByRanking(xs, ranking = rank(xs))

Arguments

xs

The vector or list to reorder.

ranking

The ranking to sort xs by, defaults to rank(xs).

Value

The result of reordering xs by ranking.


rgp documentation built on May 30, 2017, 12:45 a.m.