[R] Batch file export

2010-07-13 Thread Michael Haenlein
Dear all, I have a code that generates data vectors within R. For example assume: z - rlnorm(1000, meanlog = 0, sdlog = 1) Every time a vector has been generated I would like to export it into a csv file. So my idea is something as follows: for (i in 1:100) { z - rlnorm(1000, meanlog = 0, sdlog

Re: [R] Batch file export

2010-07-13 Thread Nikhil Kaza
write.csv(z, paste(c:/z_,i,.csvsep='')) You will have to modify this to prepend 0s. Nikhil Kaza Asst. Professor, City and Regional Planning University of North Carolina nikhil.l...@gmail.com On Jul 13, 2010, at 10:03 AM, Michael Haenlein wrote: Dear all, I have a code that generates data