Re: [R] I can't see plots

From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
Date: Sun, 22 Jun 2008 11:30:48 -0400

Josep Lluís Figueras wrote:
> Hi,
>
> I am using RSPerl package on Ubuntu and Apache2 web server. It is my first
> experience with R language :-)
>
> I have the next code embedded into a Perl CGI:
>
> use R;
> use RReferences;
>
> my @x;
> &R::initR("--silent","--no-save");
> &R::library("RSPerl");
> @x = &R::call("rnorm", 10);
> &R::call("plot", \@x);
>
> The CGI works but no plot is shown.
>
> Apache2 web server log says:
>
> [Sun Jun 22 12:01:41 2008] [error] [client 127.0.0.1] Error in pdf() :
> unable to start device pdf, referer: http://localhost/html/proveta.html
> [Sun Jun 22 12:01:41 2008] [error] [client 127.0.0.1] In addition: Warning
> message:, referer: http://localhost/html/proveta.html
> [Sun Jun 22 12:01:41 2008] [error] [client 127.0.0.1] In pdf() : cannot open
> 'pdf' file argument 'Rplots.pdf', referer:
> http://localhost/html/proveta.html
> [Sun Jun 22 12:01:41 2008] [error] [client 127.0.0.1] Caught error in
> R::call(), referer: http://localhost/html/proveta.html
>
> However, if I use R directly plots are correctly shown.
>
>
Because you aren't running R interactively, it's trying to open a pdf device. This is failing (file permissions maybe?).

You should probably specify exactly what device to open, and if it's something that writes a file, where to write it.

Duncan Murdoch
> Can anybody help me?
>
> Thanks!
>
> Josep Lluís Figueras
> (from Barcelona)
>
> [[alternative HTML version deleted]]
>
>
> ------------------------------------------------------------------------
>
> ______________________________________________
> R-help_at_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.
>



R-help_at_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. Received on Sun 22 Jun 2008 - 15:37:01 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 22 Jun 2008 - 16:30:43 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive