[R] add data to a file while doing a loop

2012-01-06 Thread Joao Fadista
Hi, I would like to know how can I keep adding data to a file while doing a loop and without deleting the data of the previous iteration. Thanks. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] add data to a file while doing a loop

2012-01-06 Thread Stephen Sefick
Without context, read reproducible code, it is hard to answer this question. What system are you on? Do you need to write one line of data or a data frame or a list out? Are trying to write a graphic out? It will be easier to answer your question with some context. Good luck! Stephen On

Re: [R] add data to a file while doing a loop

2012-01-06 Thread Joao Fadista
-help@r-project.org Subject: Re: [R] add data to a file while doing a loop Without context, read reproducible code, it is hard to answer this question. What system are you on? Do you need to write one line of data or a data frame or a list out? Are trying to write a graphic out

Re: [R] add data to a file while doing a loop

2012-01-06 Thread Rui Barradas
Hello, See ?open and ?capture.output or ?textConnection To open a connection (with 'open') then write to it is probably the solution. Rui Barradas -- View this message in context: http://r.789695.n4.nabble.com/add-data-to-a-file-while-doing-a-loop-tp4269086p4269396.html Sent from the R

Re: [R] add data to a file while doing a loop

2012-01-06 Thread Sander Timmer
So you're looking for: write.table(dataset, file=x.txt, append=TRUE) Or do I understand your question wrongly? __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] add data to a file while doing a loop

2012-01-06 Thread David Winsemius
: joao.fadi...@med.lu.se -Original Message- From: stephen sefick [mailto:ssef...@gmail.com] On Behalf Of Stephen Sefick Sent: den 6 januari 2012 14:14 To: Joao Fadista Cc: r-help@r-project.org Subject: Re: [R] add data to a file while doing a loop Without context, read reproducible code

Re: [R] add data to a file while doing a loop

2012-01-06 Thread William Dunlap
, 2012 5:27 AM To: sas0...@auburn.edu Cc: r-help@r-project.org Subject: Re: [R] add data to a file while doing a loop Thanks for the reply. Every iteration produces a text data.frame directly into a file without saving it in R. And every iteration overwrites the data produced from the previous

Re: [R] add data to a file while doing a loop

2012-01-06 Thread MacQueen, Don
Look at the documentation for whatever function you are using to write data to the file. It should be pretty obvious (look for an append argument). Otherwise you'll have to provide more information, such as a short simple example of what you have tried. -Don -- Don MacQueen Lawrence Livermore

Re: [R] add data to a file while doing a loop

2012-01-06 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of MacQueen, Don Sent: Friday, January 06, 2012 9:32 AM To: Joao Fadista; r-help@r-project.org Subject: Re: [R] add data to a file while doing a loop Look at the documentation for whatever

Re: [R] add data to a file while doing a loop

2012-01-06 Thread Joao Fadista
Message- From: William Dunlap [mailto:wdun...@tibco.com] Sent: den 6 januari 2012 19:27 To: MacQueen, Don; Joao Fadista; r-help@r-project.org Subject: RE: [R] add data to a file while doing a loop Using append=TRUE in many functions will work, but more slowly than opening a connection once