LoslegenKostenlos loslegen

Filtering rows using logical vectors

In this exercise, you'll use expressions that evaluate to a logical vector to filter rows in a data.table. All rows that evaluate to TRUE will be returned.

Note that you can refer to column names directly, without the need for the $ operator.

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.

# Filter all rows where start_station is "MLK Library"
trips_mlk <- batrips[___ == "___"]
trips_mlk
Code bearbeiten und ausführen