Remove NA values in R -


this question has answer here:

how can remove rows include na values in subset of columns?

for following data.frame, want remove rows have na in both columns id1 , id2:

name  id1   id2     na    na b     na    2 c     3     na 

i want receive one:

name  id1   id2 b     na    2 c     3     na 

mydf[!(is.na(mydf$id1) & is.na(mydf$id2)),] 

Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -