I've finally found what was wrong. The "NA's" were encoded as "unknown" in the original file (before reading into R). I now realize I was being quite dense. Thank you all for your patience and help. This is the code I ended up using:
d <- read.csv("data.csv",stringsAsFactors=F, na.strings="unknown")