Duncan Temple Lang
duncan at wald.ucdavis.edu
Wed Sep 26 21:57:05 CEST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Alberto Monteiro wrote:
> ?wordReport gives a lot of information, but I think it makes us wish for
> more :-)
> Where can I find all the ways to write Word documents using R?
Using either of the R/DCOM client packages (rcom and RDCOMClient)
you can access all the exposed functionality of Word to control
it and so create rich documents. The number of classes and functions
is large, so it can take a little time to figure out what is available
but it is quite flexible.
wordReport appears to use Visual Basic commands to get the same
effect. So if you don't mind going through an additional
"language", you could extend that to know provide access to more
of the same functionality that you get directly with the R/DCOM
One could also create the document in XML, either directly to
Word's XML format or to a different format and then transform it
with, e.g., XSL or other XML-capable tools (including R).
That's some of the ways.
> (1) is there any way to open a new document and save it automatically?
> The sequence:
> WordOpen("new_file.doc"); WordInsertText("R rulez!\n"); WordExit()
> will prompt for the Yes/No/Cancel prompt, and if I answer "Yes", it opens
> the menu to "Save As".
> (2) is there any way to write formulas in the evil Word formula format, but
> with input as decent latex-like format?
> Alberto Monteiro
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the R-help