Last Release: 0.93-1 (25 Jan 2012)
This package is a proof-of-concept and illustration of how we can post-process the output of R's graphics from cairo's SVG generation. We can read the resulting plots back into R and make the plots interactive and dynamic in simple ways such as
See some examples. These are best viewed using the Opera Web browser. Alternatively, use Firefox but the animations won't work. The stand-alone SVG viewer Batik can also be used.
In addition to rendering R plots, one can use SVG to create quite sophisticated interactive displays. There is an interesting collection of examples that combine SVG and ECMAscript at http://www.carto.net/papers/svg/samples/#jscr. For example,
This is a quite different approach from Tony Plate's RSVGTipDevice (which builds on Jake Luciani's RSvgDevice). Firstly, this uses R's interface to cairo for rendering. However, we could do the same high-level post-processing using RSVGTipDevice or RSvgDevice. But more importantly, we are identifying elements of the plots after R has created them. We do not have to set global variables for specifying tooltip text and then draw rectangles, circles, text, polygons, etc. Instead, we draw the plot as usual, and then we examine the result and enhance it. This means we can use any functionality in R for creating a plot without have to adapt it. The hard part is to identify the elements in the result. But for many common plots, this is not too difficult.
This is part of a book Deb Nolan and I are writing on Web Technologies for statistics and R. We are also working on visualization via
Here is a detailed description of an approach to associating elements in SVG and an R plot for the heatmap() function.