Computing in j (I)
Since columns can be treated as variables inside data.table
's square brackets ([ ]
), you can compute on the columns directly in j
.
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.
# Calculate median duration using the j argument
median_duration <- ___
median_duration