[R] What is the best way to have "R" output tables in an MS Word format?

Frank E Harrell Jr f.harrell at Vanderbilt.Edu
Mon May 3 17:26:32 CEST 2010


On 05/03/2010 08:47 AM, Chris Evans wrote:
> Thanks Tal&  Thomas, I am now experimenting with both SWord and R2wd and
> both are certainly a huge step forward for me, tied as I am to Word and
> the Windoze/M$ world for now.
>
> Chris

Note that many of the general solutions offered produce documents (.doc, 
.html, .rtf) that can be then converted to formats Word can take as 
described at http://biostat.mc.vanderbilt.edu/SweaveConvert.  That page 
has an example where pdflatex is used to produce a complex table 
containing graphics in some of the cells, and I used a web service to 
convert to .doc.

Frank

>
>
>
> Tal Galili sent the following  at 01/05/2010 09:44:
>
>> Hi all,
>> I forwarded this question to the r-com mailing list, and received the
>> following reply from Thomas Baier :
>>
>>
>>
>> Hi Tal,
>>
>> two solutions immediately come to my mind: SWord
>> (http://rcom.univie.ac.at) and R2wd (from CRAN).
>>
>> If creating a paper in Word, then SWord may be the better choice, if you
>> want to create reports controlled from R, R2wd might be the better one.
>>
>> Best,
>> Thomas
>
> They both look potentially very useful and can do wonderful embedding of
> tabulated data frames and graphics to judge form the help page for R2wd
> and that works on my set up.  However, I'm crash R2wd and hange R
> passing lm output with:
> 	lm.D9<- lm(weight ~ group) # from the lm help page
> 	wdBody(lm.D9)
>
> I'll try to link up with whoever I should (Thomas, Christian?) to debug
> this (and, of course, it may be particular to my set up) but I still
> argue there's a problem letting these output capabilities go to packages
> and not putting them in the core:
> a) it's easy for us not to know of them, I didn't know of R2wd nor ascii
> for example,
> b) surely to have provided really excellent graphic output in the core
> is a bit incongruent with having even provided tabs for matrices and tables?
>
> I'll pick up more in response to Max Kuhn's message.
>
> Very best,
>
> Chris
>
>
>
>


-- 
Frank E Harrell Jr   Professor and Chairman        School of Medicine
                      Department of Biostatistics   Vanderbilt University



More information about the R-help mailing list