Aan de slagGa gratis aan de slag

Deselecting specific columns

You can also drop or deselect columns by prepending the character vector of column names with the - or ! operators. For e.g., dt[, -c("col1", "col2")] or dt[, !c("col1", "col2")] would both return all columns except col1 and col2.

Deze oefening maakt deel uit van de cursus

Data Manipulation with data.table in R

Cursus bekijken

Oefeninstructies

Deselect the columns start_terminal and end_terminal from batrips.

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Deselect start_terminal and end_terminal columns
drop_terminal_cols <- ___
drop_terminal_cols
Code bewerken en uitvoeren