[R] writing 100 files

2006-05-22 Thread Federico Calboli
Hi All, I need to write as text files 1000 ish variation of the same data frame, once I permute a row. I would like to use the function write.table() to write the files, and use a loop to do it: for (i in 1:1000){ bb8[2,] = sample(bb8[2,]) write.table(bb8, quote = F, sep = '\t', row.names =

Re: [R] writing 100 files

2006-05-22 Thread Duncan Murdoch
On 5/22/2006 11:24 AM, Federico Calboli wrote: Hi All, I need to write as text files 1000 ish variation of the same data frame, once I permute a row. I would like to use the function write.table() to write the files, and use a loop to do it: for (i in 1:1000){ bb8[2,] =

Re: [R] writing 100 files

2006-05-22 Thread Uwe Ligges
Federico Calboli wrote: Hi All, I need to write as text files 1000 ish variation of the same data frame, once I permute a row. I would like to use the function write.table() to write the files, and use a loop to do it: for (i in 1:1000){ bb8[2,] = sample(bb8[2,])

Re: [R] writing 100 files

2006-05-22 Thread Marc Schwartz (via MN)
On Mon, 2006-05-22 at 16:24 +0100, Federico Calboli wrote: Hi All, I need to write as text files 1000 ish variation of the same data frame, once I permute a row. I would like to use the function write.table() to write the files, and use a loop to do it: for (i in 1:1000){ bb8[2,]

Re: [R] writing 100 files

2006-05-22 Thread Sachin J
Try this: x - 1:12 for (i in 1:2){ bb8 = sample(x) a - sprintf(whatever%f.txt,i) write.table(bb8, quote = F, sep = '\t', row.names = F, col.names = F, file = a) } HTH Sachin Duncan Murdoch [EMAIL PROTECTED] wrote: On 5/22/2006 11:24 AM, Federico Calboli wrote: Hi All, I