I want to remove some rows which contain missing value in specific columns. for example,
[,1] [,2] [,3] [,4] [,5] [,6]
[1,] 2 NA 3 3 NA 3
[2,] NA NA NA NA NA 1
[3,] NA 2 NA NA 1 1
[4,] 2 3 1 3 2 1
[5,] NA NA NA NA NA 2
[6,] 1 1 3 1 2 3
Now I want to remove some rows containing all missing value from columns 1 to column 5. in this case, I should remove row 2 and row 5. Thus, the dataframe became
[,1] [,2] [,3] [,4] [,5] [,6]
[1,] 2 NA 3 3 NA 3
[2,] NA 2 NA NA 1 1
[3,] 2 3 1 3 2 1
[4,] 1 1 3 1 2 3
How to deal with that? Thanks in advance.