[R] Multiple data frames in single csv output

R. Michael Weylandt michael.weylandt at gmail.com
Thu Mar 22 15:44:45 CET 2012


To elaborate (because I've made this mistake before): one can use
append = TRUE for write.table() but not write.csv(). You'll need to
set the other arguments in write.table() to match the csv standard
you're using.

Michael

On Thu, Mar 22, 2012 at 10:36 AM, David Winsemius
<dwinsemius at comcast.net> wrote:
>
> 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
>
> ______________________________________________
> 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