Rdocumentation
powered by
Learn R Programming
rgp (version 0.4-1)
sortBy: Sort a vector or list by the result of applying a function
Description
Sorts a vector or a list by the numerical result of applying the function
byFunc
.
Usage
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
.