I'm trying to clean up a dataset and encountering a problem, 3 colums are related so before i can continue to do some clean up, I'd like to remove the NAs ONLY when they all 3 have them.
example
A. B. C.
1.- NA. NA. NA. <- to be removed
2.- NA. NA. 10. <- not to be removed
3.- NA. 29. NA <- not to be removed
4.- NA. NA. NA. < to be removed
I have tried so far with:
subset(data, data$A == NA & data$B == NA & data$C == NA)
data_new <- data[complete.cases(data$A) & (data$B) & (data$C), ]
but nothing seems to work.