I have a df
ID <- c(101,102,103,104)
Status <- c('P','F_Avg','F_Sig',NA)
df <- data.frame(ID,Status)
I am trying to filter the failed ones and return both Pass and NA but I am not able to do so. I know it's a basic question but please bear with me and help me out.
I tried the following
df1 <- sqldf("SELECT * FROM df
WHERE Status NOT LIKE 'F%'")
and it returns only one observation and that is row1 which is 'P' but I also need row4 'NA'.