Wolfgang,

I am currently working on this very thing under Duncan Temple Lang. Or, to
be more precise what you are describing is one piece of our overarching
goal, which is to create a system in which R can be run from within a
browser (currently FireFox) with bi-directional communication occurring
between the javascript/svg/flash engines and R. This will allow us to, for
example, build web pages which can contain both R code (which can be
executed in-browser) and "live"graphics devices in the form of
javascript/svg/flash canvases, as per your query. It will also, eg, allow
for the building of rich, easily customizable GUIs for R through the
(relatively painless though not easy to do well) process of designing
interactive/multimedia web pages.

Duncan has done quite a bit of work of this nature in the past, even going
so far as embedding R in the Netscape browser some 10 years ago
(SNetscape<http://www.omegahat.org/SNetscape/>note this is quite
outdated now). More recently, last summer he created a
package (RFirefox, not currently available, see below) which embeds R within
Firefox (3.5) but currently only allows for communication from javascript
down into R (so R code can be evaluated and the results passed back up to
the javascript engine), before handing the project off to me to work on
under his supervision. Currently the installation/configuration is _very_
fragile/nonexistent, and as I said, only one direction of communication is
possible.  We are currently working on implementing communication with
javascript (and eventually flash, though this is not a priority)
objects/methods from within R. This will allow us to draw to draw directly
to javascript canvases from within an R process, among many other useful
(and not so useful) capabilities.

We hope to have a usable alpha/proof-of-concept release with bi-directional
communication between XUL/javascript and R and a mildly-robust installation
procedure sometime within the next few weeks (3-6), with a paper, live
examples, and a more complete/robust package to follow.

Glad to see there is some interest :)

Sincerely,
Gabe Becker

On Wed, Oct 13, 2010 at 8:30 AM, Wolfgang Huber <whuber@embl.de> wrote:

>
> Since now many browsers support (ECMA/Java-)scripted SVG, I am wondering
> whether there are already any examples of inserting R code into SVG
> documents (or a Javascript canvas?) either directly, or perhaps more likely
> through a JavaScript layer, to dynamically generate graphics or make them
> interactive?
>
> I am aware of the excellent packages gridSVG and SVGAnnotation, which
> facilitate making R-generated SVG plots more interesting either at
> construction time or by postprocessing; the above question is about
> employing R at viewing time.
>
> Best wishes
>
> Wolfgang Huber
> EMBL
> http://www.embl.de/research/units/genome_biology/huber
>
> ______________________________________________
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

	[[alternative HTML version deleted]]

