[R] Multiple data frames in single csv output

David Winsemius dwinsemius at comcast.net
Thu Mar 22 15:36:51 CET 2012


On Mar 22, 2012, at 6:37 AM, Andreas Emanuelsson wrote:

> Hi everybody, I have a model that outputs 1) primary analysis  
> results, 2) secondary analysis results and 3) model choice  
> parameters. I would like to output them all together as one "spread  
> sheet" to minimize my "copy paste time" since I need to run the  
> model with at least 20-30 sets of parameters. They are all in  
> different data.frames with different dimensions.
>
> However, I have tried  to construct one final output data frame the  
> different classes cant vary within each row (it seems) and I can't  
> merge, r-c-bind or fill the old data frames into a bigger new. Just  
> using a matrix seems to work but stills it feels like an crude way  
> and I lose the headers and some of the formatting option (replace  
> dot with comma).
>
> Does anyone know a if there is a better package for "layouting" csv  
> structure? (I don't want one spread sheet per table)
>
> Are there any other neat way to join data.frames but ignoring all  
> the indexing? (maybe turning them into text and printing them as a  
> csv file)?

Can't you just write them to the same file with append=TRUE?

-- 

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list