Hello,
imagine the following data.frame: ID name 1 *_A 2 *_A 3 *_B 4 *_B * = can be any pattern I want to replace every row which ends with _A by 1 and every row which ends by _B with a 0 so that the data.frame looks like the following: ID name 1 1 2 1 3 0 4 0 Which function do I use best to achieve this? Cheers, Syrvn -- View this message in context: http://r.789695.n4.nabble.com/replace-values-tp4153301p4153301.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.