Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Filtering by row
Extracting data by column
Practice using filter() and select()
The pipe operator
Sorting rows
23. Sort data by row
Summary

Instruction

Sometimes, we want to order filtered data in a certain way. The arrange() function allows us to sort row data by the values in a given column. If we wanted to sort our data by population, we'd write:

arrange(countries, population)

Exercise

Sort the rows in countries by area.

Stuck? Here's a hint!

Type:

arrange(countries, area)