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
______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel