What you can do is to name the file outside the write.csv statement file <- as.character(paste("file", i, ".csv", sep="")) write.csv(tempo, file)
Gabriel Ing. Agr. Gabriel R. Rodriguez Inst. de Clima y Agua - CNIA INTA Castelar Las CabaƱas y Los Reseros SN (1686) Hurlingham - Argentina Tel 54 11 4621 0125/1463/1684/5663 Int. 123 garo...@cnia.inta.gov.ar -----Mensaje original----- De: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] En nombre de Gator Connection Enviado el: Wednesday, April 22, 2009 4:46 PM Para: r help Asunto: [R] generate multipe output .csv files in a loop I need to generate output files as .csv file in a loop: let's say, I want to generate a sequence of files according to the loop number "i". the first file genearted should be file1.csv the second should be file2.csv I use: write.csv(temp, "file$i$.csv") in the loop but it did not work. can anyone give suggestions? thanks a lot. Jack _________________________________________________________________ Rediscover Hotmail.: Get e-mail storage that grows with you. Storage2_042009 [[alternative HTML version deleted]] __________ Information from ESET NOD32 Antivirus, version of virus signature database 4017 (20090417) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com __________ Information from ESET NOD32 Antivirus, version of virus signature database 4017 (20090417) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.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.