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

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Thu May 6 22:30:25 CEST 2010

On Thu, May 6, 2010 at 9:07 PM, Ted Harding
<Ted.Harding at manchester.ac.uk> wrote:

> Given what he said in his latest message, I now have even more
> sympathy. It's not about begging in the streets for someone to
> charitably do the job for him! It's a job that could be a service
> to many, and if it attracts enough enthusiasm from enough of those
> who know how to do it then they will willingly plunge in. That's
> how Free Software works.

 Although I think there comes a time when if you want something done
you have to go over to www.getacoder.com [yes, really] and stump up
some cash.

> I believe that Word (and maybe other MS Office software) can import
> XML. I know that XML can be converted to g/troff input (I've done it).
> It can no doubt be converted to TeX/LateX input. I'm not familiar
> enough with other document software to comment

> Then we would have a "universal" language for formatted R output,
> suitable for importing formatted R output into document preparation
> software. One would not need the full functionality of XML.
> Up to a point (I'm far from being an XML guru) I'd be prepared to
> assist with this, and in particular to test it out with groff.
> Any comments? Might there be a better suggestion than XML?

 XML shouldn't really code formatting, but semantics. I can't see the
point of having an XML for formatted R output.

 What you should have is an XML representation of a linear model
object (which basically stores the values from an lm() call). What you
do with that is then up to you. Typically you'd use XSLT to transform
the XML to other formats, so if someone wrote the XSLT to produce
HTML, you'd be able to create that.

 I think the latest MS Office document formats are XML-based, so it
would just be a matter of reading the 60,000 pages of MS Office
document format standard and writing an XSLT to do the job. You could
probably do this easier with OpenOffice file formats for which the
spec is probably only 6000 pages long :)

 I reckon if you asked on getacoder.com you'd have some offers pretty
quick.... Lots of SAS jobs going on there, hard to find R ones!


More information about the R-help mailing list