I think that for now I'll keep it as is and try to clean the data in excel. Could someone please tell me how can I export the result to csv, since write.csv exports only the last j? Thank you so much in advance! -- View this message in context: http://r.789695.n4.nabble.com/Loop-Help-tp4633558p4633677.html Sent from the R help mailing list archive at Nabble.com.