Skip to content
Prev 86120 / 398503 Next

Tranferring R results to word prosessors

In follow up to Harold's thought of using LaTeX, I have an approach when
the use of nicely formatted tables is required in a document where LaTeX
is not being used for the entire document. In other words, where you
need to use Word, OO.org's Writer or similar application for the
majority of the document body.

This involves outputting R results to LaTeX table code in a text file,
processing the file with 'latex' and 'dvips' and creating an EPS file.
Of course, the LaTeX text file is fully complete with preamble, etc.

One can then import the EPS file to a page in the document processor
file. The most recent versions of the aforementioned applications will
generate a bitmapped preview of the table content to aid in placement
and review.

You can then print the document to a PS printer or file for subsequent
use. OO.org's Writer can also use Ghostscript to print to a PDF file
using a "PDF Converter" in the printer selection dialog. This,
importantly, is different than the "Export to PDF" function. The latter
does not properly print embedded EPS images and prints the bitmapped
preview instead.

The advantage of this approach is that you don't have to mess around in
the word processing program doing a 'text to table' conversion and then
go through the formatting of the resultant columns, borders, etc.

HTH,

Marc Schwartz
On Thu, 2006-02-09 at 09:47 -0500, Doran, Harold wrote: