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]]
Gabriel R. Rodriguez
2009-Apr-22 20:09 UTC
[R] generate multipe output .csv files in a loop
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 garodri at cnia.inta.gov.ar -----Mensaje original----- De: r-help-bounces at r-project.org [mailto:r-help-bounces at 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