Erin,
Here's one way to try to find where Ghostscript is on your system:
R> system("which gs")
On my Mac it's in
/usr/local/bin/gs
So I would use
R> Sys.putenv(R_GSCMD="/usr/local/bin/gs")
Hope this helps,
Stephen
Rochester, Minn., USA
On 4/15/07, Erin Berryman <berr3415 at uidaho.edu>
wrote:> 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
> capturedata.ps'
> 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
> install.
>
> Hopefully there is a solution that a non-computer whiz like me can
> handle?
>
> Thank you,
>
> Erin
>
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
>