[R] printing R generated postcript files

Dirk Eddelbuettel edd at debian.org
Sat Jun 19 02:20:20 CEST 2004


On Fri, Jun 18, 2004 at 05:26:26PM +0200, Matej Cepl wrote:
> On Wednesday 16 of June 2004 21:23, Dirk Eddelbuettel wrote:
> > That may be related. I only recently set R_PAPERSIZE to be driven from
> > Debian's global paperconf setting which is supposed result in
> > /etc/R/Renviron having
> > 
> > ## edd Apr 2004:  use Debian's paperconf settings, with thanks to Matej 
> Cepl
> > R_PAPERSIZE=${R_PAPERSIZE-$(cat /etc/papersize)}
> > 
> > yet I just noticed that my own installation doesn't have that. And yes,
> > looks like a build-time patch failed. bNeed to check that ...
> 
> This probably means that you should install libpaper-utils (especially 
> papersize(5) may be helpful).

Hm, when I tested this the shell expansion failed even though I have
libpaper-utils installed:

edd at basebud:~> dpkg -l | grep "libpaper"
ii  libpaper-dev   1.1.14         Library for handling paper characteristics (
ii  libpaper-utils 1.1.14         Library for handling paper characteristics (
ii  libpaper1      1.1.14         Library for handling paper characteristics
ii  libpaperg      1.1.14         Library for handling paper characteristics (
ii  libpaperg-dev  1.1.14         Library for handling paper characteristics (
edd at basebud:~> cat /etc/papersize
letter
edd at basebud:~> grep ^R_PAPERSIZE /etc/R/Re
Renviron           Renviron.dpkg-old  Renviron~
dd at basebud:~> echo 'postscript("/tmp/foo.ps"); plot(rnorm(100)); dev.off()'
| R --vanilla --silent
> postscript("/tmp/foo.ps"); plot(rnorm(100)); dev.off()
Error in postscript("/tmp/foo.ps") : invalid page type $(cat 
/etc/papersize)' (postscript)
Execution halted
edd at basebud:~>

I tried all quote tick variants around   $(cat /etc/papersize)  as well
without any luck.  

In case you have that working, could you wave the cluebat at me?  I somehow
suspect that this cannot work but I may miss some magic shell pixie dust ...

Dirk


-- 
FEATURE:  VW Beetle license plate in California




More information about the R-help mailing list