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
Post a Comment