Ordering (sorting) rows of a data frame by the certain variables in the data frame. This function is essentially a wrapper for the order() function - the important difference being that variables to order by can be given by a model formula.
order_by(data, formula)orderBy(formula, data)
Arguments
data: A dataframe
formula: The right hand side of a formula
Returns
The ordered data frame
Details
The sign of the terms in the formula determines whether sorting should be ascending or decreasing; see examples below