I've installed Ghostscript and grImport in R (Windows, Rstudio). I'm following the tutorial but I immediately get the error,
> library(grImport)
Loading required package: grid
Loading required package: XML
> PostScriptTrace("petal.ps")
Error in PostScriptTrace("petal.ps") :
status 127 in running command 'gswin32c.exe -q -dBATCH -dNOPAUSE -sDEVICE=ps2write -sOutputFile=C:\Users\UsrNm\AppData\Local\Temp\RtmpsXXlWA\file1b5c623f48de -sstdout=petal.ps.xml capturepetal.ps'
In addition: Warning message:
running command 'gswin32c.exe -q -dBATCH -dNOPAUSE -sDEVICE=ps2write -sOutputFile=C:\Users\UsrNm\AppData\Local\Temp\RtmpsXXlWA\file1b5c623f48de -sstdout=petal.ps.xml capturepetal.ps' had status 127
Any help would be appreciated.
I was having the same problem under Windows 10 and I solved it by manually setting the path to ghostscript:
Sys.setenv(R_GSCMD = normalizePath("C:/gs/gs9.20/bin/gswin32c.exe"))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With