Computing stats by groups (II)
When grouping a data.table by multiple columns, you need to specify the by argument as either a character vector or a list. In this exercise, you will calculate the mean of duration for:
- Each unique combination of
start_stationandend_station - Each
start_stationfor each month
Este ejercicio forma parte del curso
Data Manipulation with data.table in R
Ejercicio interactivo práctico
Prueba este ejercicio y completa el código de muestra.
# Compute the mean duration for every start and end station
mean_station <- batrips[, ___, ___ = .(___, ___)]
mean_station