sortBy: Sort a vector or list by the result of applying a function

Description Usage Arguments Value

View source: R/list_utils.r

Description

Sorts a vector or a list by the numerical result of applying the function byFunc.

Usage

1
sortBy(xs, byFunc)

Arguments

xs

A vector or list.

byFunc

A function from elements of xs to numeric.

Value

The result of sorting xs by byfunc.


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