[R] png() or jpeg() in a php script

Dieter Menne dieter.menne at menne-biomed.de
Wed Jun 21 15:06:40 CEST 2006


Angel Roman <aroman6 <at> gmail.com> writes:

> I've got a problem with a PHP script, in which I call the system function
> (to call another processes). The call is :
> 
> system("R --slave --vanilla < path/to/source/source.R");
...


> but if I change the lines to:
> 
>   png(file="/path/to/file/file.png");
>   commands
>   dev.off()
> 
> (or with the jpeg() function)
> 
> the files are not created. any help?

Try the following in your script to find out if you can create jpeg on your
operation system.

sink("cap.txt")
capabilities()
sink()


Dieter



More information about the R-help mailing list