Cheryl Johnson
2012-Nov-06 02:37 UTC
[R] Append Data to an Excel File through each Iteration of a For Loop
Hi, I would like to find a way to append data to an excel file through each iteration of a for loop. Is there a way to use a command such as write.table and append each iteration to a different sheet? Thanks [[alternative HTML version deleted]]
Jim Holtman
2012-Nov-06 04:18 UTC
[R] Append Data to an Excel File through each Iteration of a For Loop
try the XLConnect package. You can write multiple sheets. Sent from my iPad On Nov 5, 2012, at 21:37, Cheryl Johnson <johnson.cheryl625 at gmail.com> wrote:> Hi, > > I would like to find a way to append data to an excel file through each > iteration of a for loop. Is there a way to use a command such as > write.table and append each iteration to a different sheet? > > Thanks > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
Pieter Schoonees
2012-Nov-06 15:45 UTC
[R] Append Data to an Excel File through each Iteration of a For Loop
Look at the append argument of write.table. Also, read ?write.table. The same holds for write.csv.> -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of Cheryl Johnson > Sent: Tuesday 6 November 2012 3:38 > To: r-help at r-project.org > Subject: [R] Append Data to an Excel File through each Iteration of a > For Loop > > Hi, > > I would like to find a way to append data to an excel file through each > iteration of a for loop. Is there a way to use a command such as > write.table and append each iteration to a different sheet? > > Thanks > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting- > guide.html > and provide commented, minimal, self-contained, reproducible code.