[R] compare and replace

Robert Ruser robert.ruser at gmail.com
Sat Nov 6 17:36:47 CET 2010


Hello R Users,
I'm wondering if there exists any elegant and simple way to do the
following: I have a data.frame X fills in numbers. I have a vector y with
numbers as well. Every value in X that is equal to any values in y should
be replaced by e.g. 1. Any idea?

Robert



More information about the R-help mailing list