Touche -- perhaps we could make one though? write.csv.append <- function(..., append = TRUE) { Call <- match.call(expand.dots = TRUE) for (argname in c("col.names", "sep", "dec", "qmethod")) if (!is.null(Call[[argname]])) warning(gettextf("attempt to set '%s' ignored", argname), domain = NA) rn <- eval.parent(Call$row.names) Call$col.names <- if (is.logical(rn) && !rn) TRUE else NA Call$sep <- "," Call$dec <- "." Call$qmethod <- "double" Call[[1L]] <- as.name("write.table") eval.parent(Call) } write.csv.append(1:5,"test.csv", append = FALSE) write.csv.append(1:15, "test.csv")
Output seems a little sloppy, but might work for the OP. Michael Weylandt On Wed, Sep 21, 2011 at 9:03 AM, Ivan Calandra <ivan.calan...@uni-hamburg.de > wrote: > I don't think there is an append argument to write.csv() (well, actually > there is one, but set to FALSE). > There is however one to write.table() > Ivan > > Le 9/21/2011 14:54, R. Michael Weylandt <michael.weyla...@gmail.com> a > écrit : > > The append argument of write.csv()? >> >> Michael >> >> On Sep 21, 2011, at 8:01 AM, "Ashish Kumar"<ashish.kumar@** >> esteeadvisors.com <ashish.ku...@esteeadvisors.com>> wrote: >> >> Hi, >>> >>> >>> >>> I wanted to write the data created using R on existing csv file. However >>> everytime I use write.csv, it overwrites the values already there in the >>> existing csv file. Any workaround on this. >>> >>> >>> >>> Thanks for your help >>> >>> >>> >>> Ashish Kumar >>> >>> >>> >>> Estee Advisors Pvt. Ltd. >>> >>> Email: ashish.ku...@esteeadvisors.com >>> >>> Cell: +91-9654072144 >>> >>> Direct: +91-124-4637-713 >>> >>> >>> >>> >>> [[alternative HTML version deleted]] >>> >>> ______________________________**________________ >>> R-help@r-project.org mailing list >>> https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help> >>> PLEASE do read the posting guide http://www.R-project.org/** >>> posting-guide.html <http://www.R-project.org/posting-guide.html> >>> and provide commented, minimal, self-contained, reproducible code. >>> >> ______________________________**________________ >> R-help@r-project.org mailing list >> https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help> >> PLEASE do read the posting guide http://www.R-project.org/** >> posting-guide.html <http://www.R-project.org/posting-guide.html> >> and provide commented, minimal, self-contained, reproducible code. >> >> > -- > Ivan CALANDRA > PhD Student > University of Hamburg > Biozentrum Grindel und Zoologisches Museum > Dept. Mammalogy > Martin-Luther-King-Platz 3 > D-20146 Hamburg, GERMANY > +49(0)40 42838 6231 > ivan.calan...@uni-hamburg.de > > ********** > http://www.for771.uni-bonn.de > http://webapp5.rrz.uni-**hamburg.de/mammals/eng/1525_8_**1.php<http://webapp5.rrz.uni-hamburg.de/mammals/eng/1525_8_1.php> > > > ______________________________**________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help> > PLEASE do read the posting guide http://www.R-project.org/** > posting-guide.html <http://www.R-project.org/posting-guide.html> > and provide commented, minimal, self-contained, reproducible code. > [[alternative HTML version deleted]]
______________________________________________ R-help@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.