@angel, You can try append option in write.table
for e.g. for(i in 1:20) write.table(i,"out.txt",append=T,sep="\t",row.names=F,col.names=F) This will help you save your all results by writing each results on subsequent rows. Hope this helps Ozgur >Hello Jim >thank you so much for your response. >When I use write.csv, on the csv file is saved only the last loop >So when I write >results.matrix <- apply(degree_w(net.static[[i]]), 2, mean) >write.csv(results.matrix, file = "results.csv") >instead of getting a 550 line document with all loop results, I only get the last one! >Could you please help me? >Thank you so much in advance -- View this message in context: http://r.789695.n4.nabble.com/Loop-Help-tp4633558p4633722.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.