Tuesday, March 22, 2011

Postscript and R

This took me a while.  I tried doing a batch job (based on an example) that used postscript function to create a postscript file. Natutally, the function could not be found. I googled about for almost an hour. There is a lot of useful information about R on the web. But there is very little debugging help when just getting started.

I think that part of the problem is that I installed R manually. The Ubuntu Package Manager did not have R. Today, I was reminded of the Synaptic Package Manager and that had a lot of r-cpan stuff which I had not downloaded (nor seen). I found an r-base and r-base-core. The r-base had not been installed, so I installed it and some other packages that looked important. The postscript function now works although I wish it had been a clean install.

Update: Another day, postscript not working.  Tried to install Cairo and got some errors within R. It could not find cairo.h

 Looking at my xterm history, I found
>library(help="grDevices")
>

1 comment:

  1. ARGGGGGH! Here's a lesson. I was copying and pasting the command postcript (sic!) from a batch file I had created. R could not find this function. But when I copy and pasted the command postscript("file.eps") it worked. Well, I can't believe that it took me so long to find this error.

    ReplyDelete