[Rd] How to point R toward Ghostscript on a Windows XP system

Jeremy Koster helixed2 at yahoo.com
Fri Jan 14 19:12:55 CET 2011

A colleague designed a script for a bar plot, which I'd like to export to my directory via the barplot command:

bitmap(file="barplot.tif", type="tifflzw", height=4, width=6.5, res=1250)

Unfortunately, this command produces the following error message: 

Error in system(paste(gsexe, "-help"), intern = TRUE, invisible = TRUE) : 
  'gswin32c.exe' not found

>From consulting the archives and the help file, I deduced that I needed to install Ghostscript, which I did.  Subsequent messages in the archives suggest directing R toward Ghostscript using an environmental variable, specifically R_GSCMD.

Unfortunately, I haven't figured out how to use this command.  Can anyone provide assistance?

This is for R version 2.12.0 using Windows XP on a Dell laptop.  The path for ghostscript in my program files folder is:
C:\Program Files\gs

Many thanks,
UC Anthropology

More information about the R-devel mailing list