[R] Write multiple objects / data frames into a single .csv -- write.csv

Yihui Xie xieyihui at gmail.com
Fri Oct 10 07:47:31 CEST 2008


use "append = TRUE" or rbind() your data.frames together before
writing the csv file.

Regards,
Yihui
--
Yihui Xie <xieyihui at gmail.com>
Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086
Mobile: +86-15810805877
Homepage: http://www.yihui.name
School of Statistics, Room 1037, Mingde Main Building,
Renmin University of China, Beijing, 100872, China



On Fri, Oct 10, 2008 at 5:54 AM, Michael Just <mgjust at gmail.com> wrote:
> Hello,
> Is there a way to put multiple data.frames or objects into a single .csv ?
> I know I can use sink() to do this for a text file. Is there way to do it
> for a .csv?
>
> e.g. for sink()
>
> sink("c5.k.s.p.92.LN.sl.vs.mean.txt")
> symnum(c5.k.92.LN.sl.vs.mean)
> symnum(c5.s.92.LN.sl.vs.mean)
> symnum(c5.p.92.LN.sl.vs.mean)
> sink()
>
> Could I put these all into a single .csv, in a similar format to sink()?
>
> Thanks,
> Michael Just
>
>        [[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.
>



More information about the R-help mailing list