[R] Help for R on Windows for non-Win-enabled!

(Ted Harding) Ted.Harding at manchester.ac.uk
Fri May 30 01:48:19 CEST 2008


Hi Folks,
I need help with a query about R on Windows, specifically
about graphics devices.

I'm advising someone remotely (so it's all by email) who
is running R on Windows, while I am not (Linux only).

Things have reached the stage where saving graphics plots
as Windows metafiles is looming.

I've been told that the result of "?device" in Windows is
as follows (which is different from what I get on Linux,
which does not mention anything Windowsy):

  Description
  The following graphics devices are currently available: 

  windows The graphics driver for Windows (on screen, to printer
  and to Windows metafile). 
  postscript Writes PostScript graphics commands to a file
  [... etc.]

So, presumably, the code to save a plot to a WMF could be
somthing on the lines of

  windows(file="....",...)
  plot(...)
  dev.off()

(but I'm only guessing here).

When I open the PDF of the R Reference Index, and search for
"metafile" or "wmf", I get the response "0 documents with
0 instances". Also, searching on "windows(" draws a blank, and
as far as I can see none of the many hits when simply searching
on "windows" is relevant.

In the R for Windows FAQ, I find only one reference to "metafile"
which simply says:

  5.2 I hear about some nifty features: please tell me about them!
  You have read the file README.R-2.7.0? There are file menus on
  the R console, pager and graphics windows. You can source and
  save from those menus, and copy the graphics to png, jpeg, bmp,
  postscript, PDF or metafile. There are right-click menus giving
  shortcuts to menu items, and optionally toolbars with buttons
  giving shortcuts to frequent operations.

Saving to a metafile via a GUI is out of the question in this
context, since several graphs are going to be produced within a loop.

And, in the FAQ, "windows(" is mentioned only once, in connection
with Japanese fonts!

So I cannot find any information about using the windows()
function to write a metafile.

So how should it be done?"

And. generally, where should one look for information about
the peculiarities of running R on Windows?

With thanks,
Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at manchester.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 30-May-08                                       Time: 00:48:12
------------------------------ XFMail ------------------------------



More information about the R-help mailing list