hi members, At the moment i try to create a web-based GUI for R. I am at the beginning of this project but i have already now a strange problem.
I would like to create an image which should also be saved. i realize this with following code line in my PHP file: $output= intval(shell_exec("R --no-save --slave < test.R 1>../tmp/R.output 2>../tmp/R.log")); The code in the R script (test.R) is: jpeg(filename = "plot.jpeg", width = 1024, height = 768, units = "px", pointsize = 12, quality = 75, bg = "white") split.screen(c(2,1)); screen(1,new=TRUE) plot(s); screen(2,new=TRUE) plot(y); dev.off() The error message which I get is this one: Error in jpeg(filename = "plot.jpeg", width = 1024, height = 768, units = "px", : X11 module cannot be loaded In addition: Warning message: In jpeg(filename = "plot.jpeg", width = 1024, height = 768, units = "px", : unable to load shared library '/home/combiuser/emeyer/R/R-2.7.0/modules//R_X11.so': /usr/lib/libcairo.so.2: undefined symbol: FT_GlyphSlot_Embolden Execution halted And the strange thing is when i type in the shell just "R --no-save --slave < test.R 1>../tmp/R.output 2>../tmp/R.log" the image is created and all works fine!!!! It has to be a problem for the X11 module when i start R via Apache/PHP. But why and what could I do to solve this problem??? Any suggestions would be really helpful. Best regards from Germany Paul sessionInfo() R version 2.7.0 (2008-04-22) i686-pc-linux-gnu locale: LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.