Hi Jim, I just tried the code and it worked perfectly! You brought me a huge step nearer to my bachelors degree ;) thank you very much! Robert -- View this message in context: http://r.789695.n4.nabble.com/How-to-replace-strings-in-data-frames-by-condition-tp4712469p4712491.html Sent from the R help mailing list archive at Nabble.com.