[R] Writing dataframes side by side in a file

Steve Lianoglou mailinglist.honeypot at gmail.com
Wed Jul 6 21:25:13 CEST 2011


Hi,

On Wed, Jul 6, 2011 at 1:18 PM, Cliff Clive <cliffclive at gmail.com> wrote:
> Is there a quick and easy way to write data frames side-by-side in a csv file
> with one column separating them?
>
> I could just fill them with empty rows so they all have the same height,
> then cbind them with empty columns in between, but I'm looking for a more
> elegant solution, if one exists.

Perhaps using `merge` and playing with the `all`, `all.x` and `all.y`
parameters will help you in making the large data.frame you would
could serialize using write.table ... it's similar in principle to
cbind-ing, but may prove less laborious.

-steve

-- 
Steve Lianoglou
Graduate Student: Computational Systems Biology
 | Memorial Sloan-Kettering Cancer Center
 | Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact



More information about the R-help mailing list