Learn R Programming

dataquieR (version 2.0.1)

util_sort_by_order: Sort a vector by order given in some other vector

Description

Sort a vector by order given in some other vector

Usage

util_sort_by_order(x, order, ...)

Arguments

x

the vector

order

the "order vector

...

additional arguments passed to sort

Examples

Run this code
if (FALSE) {
util_sort_by_order(c("a", "b", "a", "c", "d"), letters)
}

Run the code above in your browser using DataLab