1. Learn
  2. /
  3. Courses
  4. /
  5. Data Manipulation with data.table in R

Connected

Exercise

Computing multiple stats

Let's now combine everything from the past two exercises to find multiple summary statistic with multiple groups in batrips.

Instructions 1/2

undefined XP
  • 1

    Group by start_station and end_station to calculate the mean duration and the total number of trips. Name these columns mean_duration and total_trips, respectively.

  • 2

    Group by start_station, end_station, and for each month in start_date to calculate the minimum and maximum duration. Name these columns min_duration and max_duration, respectively.