R how to find NA values after using addNA function
- by screechOwl
I have a data frame with a bunch of categorical variables. Some of them contain NA's and I use the addNA function to convert them to an explicit factor level. My problem comes when I try to treat them as NA's they don't seem to register.
Here's my example data set and attempts to 'find' NA's:
df1 <- data.frame(id = 1:200, y =rbinom(200, 1,…