0

I have a large dataset with hundreds of colums and thousand of rows. I want to select and create another dataset that has no missing values in multiple colums.

i.e

A  B   C   D   E
1  3   2   2   2 
2  NA  3   1   2 
3  NA  2   1   2
NA 2   NA  1   NA

I want to get rows that do not contain NAs in column A, B, C. how can I do that? Thank you

Darren Tsai
  • 32,117
  • 5
  • 21
  • 51
Tess
  • 67
  • 6
  • Try `df[complete.cases(df[, 1:3]),]`, where `1:3` corresponds to the numeric index of columns `A` to `C` – benson23 Jun 13 '23 at 03:55

0 Answers0