Thank you Jeff, that sounds like the solution to my problem but how would I do that code-wise? could you please help? -- View this message in context: http://r.789695.n4.nabble.com/Loop-Help-tp4633558p4633701.html Sent from the R help mailing list archive at Nabble.com.