I'm having a similar problem , did u get a resolution ? -- View this message in context: http://r.789695.n4.nabble.com/Replacing-sets-of-rows-in-matrix-within-a-loop-tp4634658p4648248.html Sent from the R help mailing list archive at Nabble.com.