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 = 1)
write.csv(z, "c:/z_i.csv")

Where "z_i.csv" is a filename that is related to the run (e.g. z_001.csv,
z_002.csv, ...).

Could anyone please advice me on the most convenient way of doing this?

Thanks very much in advance,

Michael

	[[alternative HTML version deleted]]

