[R] R: Including R plots in a Microsoft Word document
Gabor Grothendieck
ggrothendieck at myway.com
Fri Feb 20 20:04:37 CET 2004
However,
1. the editing of .ps files once they have been inserted
into Word seems to be limited compared to using Windows metafiles.
2. R on Windows does not provide the capability to do right
click copy with a .ps file so you have to right click save the
file and then insert it into Word which is a bit less convenient
than using the clipboard and it leaves a file around that you
still have to delete.
---
Date: Fri, 20 Feb 2004 12:29:24 -0500
From: Frank E Harrell Jr <feh3k at spamcop.net>
To: <MSchwartz at medanalytics.com>
Cc: <r-help at stat.math.ethz.ch>
Subject: Re: [R] R: Including R plots in a Microsoft Word document
On Fri, 20 Feb 2004 11:08:00 -0600
Marc Schwartz <MSchwartz at medanalytics.com> wrote:
> On Fri, 2004-02-20 at 09:54, Mahmoud K. Okasha wrote:
> > Greetings List,
> >
> > I am conducting some large simulations using R. As a result, I get
> > many plots but I'm having some trouble with including some of them in
> > a Microsoft Word document. Can any one tell me the easiest method of
> > having copies of the R-graphs in the Word documents?
> >
> > Best regards
> > Mahmoud
>
>
> A couple of different ways:
>
> 1. If you actually need to see the graphics within the document and/or
> send the .doc file to someone who needs to be able to see the plots as
> they appear, then you should use Windows Metafile format images. Since
> these are vector format files, you can resize them as required on your
> pages. Bitmapped images (ie .BMP/.PNG) will distort as you resize them.
> You can generate these by plotting directly into an R plot window and
> then copy (ie. right mouse click) and paste into the Word document using
> the Windows clipboard, or generate the plot files directly using the
> win.metafile() function.
>
> 2. If you will be generating hard copies of the documents using a PS
> printer, you can generate the graphics as EPS files using the
> postscript() function. Word can import EPS files, but you will see them
> only as place holders in your document (ie. a frame box) since Word
> cannot actually interpret the images for display. Keep in mind that the
> function has very specific argument requirements to enable the
> generation of EPS files. These include:
Newer versions of Word will display postscript and pdf images on-screen,
so I think these are the way to go. -Frank
More information about the R-help
mailing list