There is no usage example for replace(). Here is a patch to replace.Rd that offers one. # Clean up a vector of text answers foo <- c("Yes”, "n”, "no answer") foo <- replace(foo, list=c(2, 3), values=c("No”, NA)) foo # "Yes" "No” NA diff attached best wishes, tim