RGraphicsDevice_0.5-0.tar.gz (02 August 2011)

This package provides a framework for implementing R graphics devices with R functions rather than C code. It is intended to be used for prototyping new graphics devices and for facilitating those who aren't familiar with C to write R graphics devices. We can use this to avoid tiresome details when exploring new devices and media.

The package comes with an incomplete prototye of a device that writes JavaScript code to render the R graphics on a JavaScript canvas. See https://developer.mozilla.org/en/Canvas_tutorial/Drawing_shapes

We plan to use this to implement a Flash/Flex3 graphics device which will generate R graphics content that can be rendered as Flash.


The source for the package is RGraphicsDevice_0.5-0.tar.gz. You also need the RAutoGenRunTime package which provides class definitions on which the generated code reliess.


  • A Guide to Implementing a New Device
    And a PDF version here
  • JavaScript graphics device prototype and some examples of using it.
  • Simple SVG graphics device prototype and some examples of using it.
  • Notes on the design
    And also the code used to generate the code
  • Todo list
  • The Code

    The code for this package consists of C and R code. 98% of the C code and 70% of the R code was programmatically generated using the RGCCTranslationUnit package. The R code to generate (most of) the code in this package is available here. There is a description of the process for generating the code here.
    Duncan Temple Lang <duncan@wald.ucdavis.edu>
    Last modified: Tue Oct 13 16:28:47 PDT 2009