[R] Save image as metafile

David Winsemius dwinsemius at comcast.net
Mon Dec 8 20:32:21 CET 2008

On Dec 8, 2008, at 7:51 AM, mentor_ wrote:

> Hi,
> how can I save an image as a metafile?
> I know within windows you can do a right click and then 'save image as
> metafile'
> but I use Mac OS X...

Which means this question would be better posed on the Mac OS list.

> I know as well that mac users have a right click as
> well, but
> it does not work.

Are you using the R.app? If so, then you need to focus on the quartz  
device window (by clicking on it or choosing it from the Window"  
pulldown menu)  and choose Save as.. from the File menu. It will not  
offer to save it as a windows metafile, but rather does so as a pdf.  
In Preview you can open the pdf and then save as other formats,  
although wmf is not one of the options. If you prefer a tiff file, you  
could use Grab. Even LemkeSoft's GraphicConverter does not offer a WMF  
option, so it's probably a proprietary format that M$ is not  
documenting well or trying to restrict in some manner. To find out  
what devices are available, try:

 > capabilities()
     jpeg      png     tiff    tcltk      X11     aqua http/ftp   
sockets   libxml     fifo   cledit    iconv      NLS
     TRUE     TRUE    FALSE     TRUE     TRUE     TRUE     TRUE      
TRUE     TRUE     TRUE     TRUE     TRUE     TRUE
  profmem    cairo
    FALSE     TRUE

So on my machine, a png device can get graphics output. That should  
provide all of the functionality of a wmf format and be much more  
> Is there a command in R for saving images as metafiles?

It would appear not, but why would it be necessary? What's wrong with  
the choice among jpeg, png, pdf or tiff?

David Winsemius

> Regards,
> mentor
> -- 
> View this message in context: http://www.nabble.com/Save-image-as-metafile-tp20894737p20894737.html
> Sent from the R help mailing list archive at Nabble.com.
> ______________________________________________
> 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.

More information about the R-help mailing list