[R] mac ghostscript help

Erin Berryman berr3415 at uidaho.edu
Sun Apr 15 22:24:53 CEST 2007

Hello R community,

I am hoping to use a new package that I just installed called  
"grImport" to import ps images into R for further manipulation using  
either base graphics or grid.  I downloaded the most recent version  
of Ghostscript from http://www.cs.wisc.edu/~ghost/ that I could find  
(v.8.56) for Mac OSX. However, I am apparently quite ignorant about  
how the required Ghostscript software works.
When I run PostScriptTrace after loading the grImport package, I get  
this response:

 > PostScriptTrace("/Users/erinberryman/Documents/data.ps")

Error in PostScriptTrace("/Users/erinberryman/Documents/data.ps") :
	status 256 in running command 'gs -q -dBATCH -dNOPAUSE - 
sDEVICE=pswrite -sOutputFile=/dev/null -sstdout=data.ps.xml  
ESP Ghostscript 7.07.1: Unrecoverable error, exit code 1

I am confused by the mention of a Ghostscript 7.07.1, because that is  
not the version that I have installed on my computer. After running a  
search of the R archives, I began to think that maybe I needed to  
tell R where my Ghostscript is, so I began to look for it. Now here  
is where I feel I am missing some key concept, because I find a  
folder called "ghostscript-8.56" that contains many files and folders  
with more files, and I have no idea which file is THE ghostscript  
that grImport wants to use. I used the following code to try to  
direct R to the correct folder for Ghostscript:

 > Sys.putenv(R_GSCMD="/Users/erinberryman/ghostscript-8.56")
 > PostScriptTrace("/Users/erinberryman/Documents/data.ps")

Error in PostScriptTrace("/Users/erinberryman/Documentsdata.ps") :
	status 32256 in running command '/Users/erinberryman/ 
ghostscript-8.56 -q -dBATCH -dNOPAUSE -sDEVICE=pswrite -sOutputFile=/ 
dev/null -sstdout=data.ps.xml capturedata.ps'
/bin/sh: line 1: /Users/erinberryman/ghostscript-8.56: is a directory

Right, it is a directory indeed, but I do not know which specific  
file to give, since there are so many of them in that Ghostscript  

Hopefully there is a solution that a non-computer whiz like me can  

Thank you,


More information about the R-help mailing list