extract
Reorder data frame returning column col reordered according to the values in column accordingTo
extract(x, col, accordingTo = 1)
x
: a data framecol
: column to be orderedaccordingTo
: column to take as the patterndata frame reordered
Diego J. Pedregal
Useful links