LoslegenKostenlos loslegen

Adding columns by group

Recall that you can perform computations by group using the by argument of the data.table. In this exercise, you will add new columns by group to the original data.table by reference.

Diese Übung ist Teil des Kurses

Data Manipulation with data.table in R

Kurs anzeigen

Interaktive Übung

Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.

# Add a new column equal to total trips for every start station
batrips[, ___, by = ___]
Code bearbeiten und ausführen