arrange {plyr} | R Documentation |
This function completes the subsetting, transforming and
ordering triad with a function that works in a similar
way to subset
and transform
but for reordering a data frame by its columns. This
saves a lot of typing!
arrange(df, ...)
df |
data frame to reorder |
... |
expressions evaluated in the context of
|
mtcars[with(mtcars, order(cyl, disp)), ] arrange(mtcars, cyl, disp) arrange(mtcars, cyl, desc(disp))