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
Since we don't have your data I will use mtcars. Suppose we want to set values anywhere in mtcars that are equal to 4 or 19.2 to NA
ind <- which(mtcars == 4, arr.ind = TRUE) mtcars[ind] <- NA
In your setting you would replace this number by "D" or "E"