A simple problem I can't seem to figure out!
> ID = c(1, 1, 2)
> var = c("A", NA, NA)
> d <- data.frame(ID, var)
> d
ID var
1 1 A
2 1 <NA>
3 2 <NA>
What I want to be able to do is remove the 2nd row using dplyr, based on the fact that there is a row with the same ID that has a value for var. If there is only a single ID, I don't want to remove it.