MulaiMulai sekarang secara gratis

Filtering rows using positive integers

You can filter the required rows from a data.table by providing the row indices to its first argument (i), just like when working with a data.frame. However, unlike a data.frame, you don't need to add a comma (,) when filtering rows.

Latihan ini adalah bagian dari kursus

Data Manipulation with data.table in R

Lihat Kursus

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Filter third row
row_3 <- batrips[___]
row_3
Edit dan Jalankan Kode