[R] wordReport

Duncan Temple Lang duncan at wald.ucdavis.edu
Wed Sep 26 21:57:05 CEST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



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
connections.

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.


> Namely:
> 
> (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
> 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.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG+rmQ9p/Jzwa2QP4RAgZKAJ4+W4wHEQspWYNLSIwvj0b26MSe8QCfdvE4
vb8YCnFaT5a4NPbfsfQ81BU=
=04Pr
-----END PGP SIGNATURE-----



More information about the R-help mailing list