powered by
Sort a vector by order given in some other vector
util_sort_by_order(x, order, ...)
the vector
the "order vector
additional arguments passed to sort
sort
if (FALSE) { util_sort_by_order(c("a", "b", "a", "c", "d"), letters) }
Run the code above in your browser using DataLab