Skip to content
Prev 219372 / 398500 Next

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

Thanks Tal/Petr, I regularly use the clipboard option but for most of
what I do people would prefer to see things in proportional fonts and
I'd love to be able to reformat tabulations easily to get nice layouts.

Of course, I've got very adept at global search and replace of
successive spaces with tabs then replacing successive tabs with single
tabs until I have tables starting to be tabbed as I'll need them to then
use Word's Table Convert ... and them I'm where I'd like to have been
and can start dragging to get columns looking right, applying bold (say)
to particular columns etc.

For a lot of what I do that means that I've done some nice
mathematical/statistical work in R in seconds, some of that is fairly
trivial and some of uses the wonders of R that trump SPSS on so many
grounds of logic, extensibility, power, object orientation etc. and
sometimes, particularly with graphics, or things that need to be
replicated over groups etc. you can get gasps of awe from even quite
serious SPSS adepts.

However, having done that in seconds, I then spend minutes, sometimes
many minutes, formatting text to get output that matches for numbers the
glories of R's graphics. By contrast, when I was using SPSS and with its
admittedly very limited output, I could pretty much just copy with the
clipboard, paste and can reformat in seconds and most things like ANOVA
results and correlation matrices would be tabbed.

It does look to me as if sword and R2wd might come to do a lot of what
I'd like I think one thing that would help that greatly would be the
ability to add the tab character to the supported output of R.  More on
why I'd vote for this being in the R core not in packages separately.

Chris



Tal Galili sent the following  at 03/05/2010 10:42: