I currently have a dataframe in which there are several rows I would like converted to \"NA\". When I first imported this dataframe from a .csv, I could use na.strings=c(\"A
data[ data == "D" ] = NA
Note that if you were trying to replace NA with "D", the reverse (df[ df == NA ] = "D") will not work; you would need to use df[is.na(df)] <- "D"