~/ learn/ afm-112/ cards/ na.omit, imputation, duplicated
1 of 10

In R, type the call that returns orders with every row containing an NA removed.

In R, type the call that returns orders with every row containing an NA removed.

Answer

na.omit(orders)

The whole row goes, whichever column was blank. With 1005 blank, nrow() is 11. complete.cases(orders) is the logical vector behind it.

space flip · ← → navigate · esc to exit
NORMAL ~/memra/library/2270a971-773d-43fd-9d95-c1c72fdac053/flashcard utf-8 LF