I cannot generate PDF output with R. Blank pages only. (Linux)
If I want to plot a diagram in pdf, it doesn't work. I only get a blank pdf page. Here's a small example.
> pdf("try.pdf")
> plot(x=c(1,2,4,2,5))
> dev.off()
I also tried the print () command. But no luck:
> print(plot(x=c(1,2,4,2,5)))
NULL # <- is this an error?
My OS is Ubuntu 12.10 64bit. My R version is 2.15.2.
Other output formats work (e.g. jpeg (), png ()). This is the first time I use PDF output in Ubuntu (I worked on Win with no problem).
Any help would be greatly appreciated.
+3
source to share
2 answers
Old question, but I had the same problem and was very puzzled.
In my case, it turned out that the / tmp directory was full. After deleting unnecessary tmp files, everything is back to normal. Additional problem I ran into: Calling help for any function (like "help (mean)") only returned blank pages.
0
source to share