[R] Sending graphics output to connections
Prof Brian D Ripley
ripley at stats.ox.ac.uk
Sat Jan 27 09:44:45 CET 2001
What would you like to be able to stream? Most Web-based graphics is
bitmapped, and it is not useful to stream individual bitmapped files, as
they only come into existence when the device is closed. Postscript is
streamable: the planned PDF is not (streaming PDF over the web depends on
byte-addressing and sending the trailer first).
In so far as I can envisage what you want to do, it would suffice to write
a graphic plot via, say, png, then send the file to a socket via readBin
once socket connections are in place.
[BTW, the only problem with socket connections I can see is handling
packet sizing and end issues, where you need to know more than just the
raw socket details, and things like proxies and firewalls.]
On Sat, 27 Jan 2001, Tim Churches wrote:
> In the first issue of the excellent R news, Brian D. Ripley muses :
> "What can I do with connections? ... In short, almost everything you used to
> do with files. The exceptions are the graphics devices which write to files,
> and it is not yet clear if it is beneficial to be able to send graphics
> outputs to connections. ..."
> One benefit would be the ability to stream graphics back to a (possibly
> remote) client of the R session, such as a Web browser or even an "R thin
> client" which communicates with an R process on a server somewhere. The
> other part of this scenario, that is, remote controlling an R session from a
> socket, is, as Prof. Ripley notes, already planned and can currently be
> fudged in V1.2.1 with an explicit loop reading and evaluating lines of input
> from a pipe connection as illustrated in the article.
>  Ripley BD. Connections. <I>R News</I> 2001;1(1):16-17. Available at
> http://cran.r-project.org/doc/Rnews/ Accessed on 2001-Jan-27.
> (<I>...</I> denotes italics. I think that is the correct citation for an
> e-journal in Vancouver format, but would appreciate suggestions or
> Tim Churches
> 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
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
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