Learn R Programming

rgp (version 0.4-1)

sortByRanking: Sort a vector or list via a given ranking

Description

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

Usage

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.