ComeçarComece de graça

Combining i and j

As you saw in an earlier exercise when you combine i and j, data.table first filters the rows in i and then applies the computation in j. This applies when calculating multiple stats as well.

Additionally, you can also specify plot(), hist() or any other plotting functions in the j argument.

Este exercício faz parte do curso

Data Manipulation with data.table in R

Ver curso

Exercício interativo prático

Experimente este exercício completando este código de exemplo.

duration_stats <- batrips[___, 
                          .(___, 
                            ___)]
duration_stats
Editar e executar o código