This page is for Linux only!! But not necessary
---
- Ghostscript
When using the function bitmap()
in Linux, the R
system requires Ghostscript software
to translate figure from ps file to other type image file, include jpeg, png and bmp etc.
To download, install and get more information, see
GNU Ghostscript or
ESP Ghostscript.
- In Renviron file
Under ${R_HOME}/etc/Renviron
,
add an R system environment variable for ghostscript.
If the default gs
is at /usr/bin/gs
,
that Renviron will be
```
R_GSCMD=${R_GSCMD-'/usr/bin/gs'}
```
- In Script
If no permission to modify Renviron file, you can use the
R command Sys.putenv()
to setup the environment variable.
If the default gs
is at /usr/bin/gs
,
that environment variable can be setted by
```
Sys.putenv("R_GSCMD"="/usr/bin/gs")
```
See also Sys.getenv()
.
- In MS-Windows
Use gswin32c.exe
to instead of gs
in Unix.
---