Ordering rows
Ordering aggregated data is quite a common operation. This can be elegantly accomplished by simply chaining data.table
expressions together.
This exercise is part of the course
Data Manipulation with data.table in R
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Compute the total trips grouped by start_station and end_station
trips_dec <- batrips[, ___, by = .(___,
___)]
trips_dec