Sort data frames by columns

To select areas of interest in a data frame they often need to be ordered by specific columns. The dplyr arrange() function supports data frame orderings by multiple columns in ascending and descending order.

  • Use the arrange() function to sort data frames.
  • Sort data frames by multiple columns using arrange().
arrange(<my_data_frame>, <column_one>)
arrange(<my_data_frame>, <column_one>, <column_two>, ...)
View Interactive Version