Hi Michael, yes you were right and your solution works great. thanks a lot. I managed to do it but with 4 lines of code rather than only 1. Cheers -- View this message in context: http://r.789695.n4.nabble.com/Relevel-dynamically-tp4299531p4300080.html Sent from the R help mailing list archive at Nabble.com.