Thanks Jorge It works great. I solved it by using loop, but i like your way better. Thanks again Cameron -- View this message in context: http://r.789695.n4.nabble.com/RowSums-Question-tp3049261p3049682.html Sent from the R help mailing list archive at Nabble.com.