Best Answer · By JanBask Data Science Expert
Answered on Nov 7, 2019
Using dplyr, we can reorder a dataframe based on any value of a column using arrange() function which can reorder any values in ascending or descending order. For now as of example, let us explain with the mtcars dataset that is built in R.
head(mtcars)

Now we reorder the Data Frame by cyl first, then by descending wt. We can do the following
head(arrange(mtcars,cyl,desc(wt)))
