[R] R on the web
David Brahm
brahm at alum.mit.edu
Mon Mar 18 16:37:57 CET 2002
Arne Mueller <a.mueller at icrf.icnet.uk> wrote:
> I'd like to create diagrams for dynamic web-pages via a cgi-script that
> itself uses R. Sadly, I found out that the png and jpeg devices need an
> X-server :-( , so I cannot use these nice devices. Does any one have any
> experience using R for on-the-flycreation of graphics for web-pages...?
One possibility is to generate a pdf file, then redirect the user's browser to
that file. Here are a few relevant lines from such a cgi script:
## Inside the R code:
pdf("mynewgraph.pdf")
## Graphics commands
dev.off()
## After R has run:
print "<META HTTP-EQUIV=Refresh CONTENT='0; URL=mynewgraph.pdf'>";
--
-- David Brahm (brahm at alum.mit.edu)
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list