I'm encountering problems when I want to export a plot from R into a PNG, using several R packages from the toolshed(s).
This problem is probably related to the following issue: http://dev.list.galaxyproject.org/package-r-xx-problem-X11-is-not-available-td4663344.html
Therefore, I'm using the package: http://testtoolshed.g2.bx.psu.edu/view/iuc/package_r_3_0_2
When I run R code of the following structure:
png(output_PValue_distribution_plot) plot(x_var,y_var) dev.off()
R crashes with the following error:
Error in .External2(C_X11, paste("png::", filename, sep = ""), g$width, : unable to start device PNG Calls: png In addition: Warning message: In png(output_PValue_distribution_plot) : unable to open connection to X11 display '' Execution halted
How I interpret this is that in order to produce PNG's, R needs to be compiled with the X11 library.
Because the installer from the toolshed uses the compilation argument " --without-x", it doesn't compile with X11 and so it is not possible to produce PNGs, correct?
I also tried another solution; installation of R with X from the following repository: https://testtoolshed.g2.bx.psu.edu/repository?repository_id=5f7d83aa4f577607 . However, the repository requires several other dependencies which are not programmed within the installer: libx11-dev libxt-dev (and some more, because after all it still work out).
So, what would be the best way to create a PNG figure from my plot(s) within an R instance from a toolshed?
Does it require R to be compiled with X11 or are there ways to overcome this (I am not sure but I thought I read something about Cairo)?
Or would somebody recommend to use a non-R program to convert from e.g. PDF/SVG to PNG? I think this is awckward since R should be the perfect tool to produce PNG figures.
Thanks in advance,