The RGtkHTML package (0.3-1)
The RGtkHTML package provides bindings to the gtkHTML
library and specifically the GtkHTML and GtkHTMLEmbedded classes.
These allow one to add HTML displays to Gtk GUIs created in S and to
control the actions and contents of the HTML.
One can specify S functions as callbacks for
events such as
This allows us to create our own customized browsers with "applets"
written in S, including embedded graphics devices (using gtkDevice).
- fetching URLs for images, etc.
- handling links,
- processing form submissions,
- creating embedded displays from <OBJECT> tags
in the HTML
Some high-level GUIs are available in the RGtkViewers package
that are built using the RGtk package.
We encountered and fixed two esoteric bugs in the gtkhtml
tokenizer. This allows us to use global assignments inside attributes
(e.g. <OBJECT action="x <<- 1">) which used not work but
simply ignored the remainder of the document. Additionally, it avoids
the addition of extra spaces within nested quotes.
Here is a patch for gtkhtml-1.1.6 that corrects
them. Alternatively, a full version of the library that contains the
patch is available.
There is now support for accessing HTML
form elements from R code simplifying the programming across the two
systems and the layout of simple GUIs that can be implemented using
The current version is available as a
GNU-zipped tar file
Installation of the package requires
the RGtk package.
And that package must have been installed using
the --clean (or -c) argument, i.e.
R CMD INSTALL --clean RGtk
in order to create the necessary
needed by this
Next, you will need to install the gtkhtml
library. (This may involve upgrading other dependent libraries.)
Given these dependencies, installing this RGtkHTML package can be as simple
R CMD INSTALL RGtkHTML
Versions 0.3 of this package and higher provide a facility by which
one can access form objects and their elements (i.e. the widgets
corresponding to the <input> tags) from R code.
To use this package within an R session, you will need to make
available to the dynamic loader. The simplest way to do this
currently is to add
this directory to your
In the future, all of these issues may be taken care of automatically
Windows There is currently no version for this package
for Windows available. One first needs gtkHTML working on Windows. Mail me to let me know
of any interest in having it work on Windows.
There are currently a few examples
- See the RGtk package
- Generating the bindings
- Some notes on mechanism used to generate the bindings.
- Embedded widgets in the Gtk HTML widget
- A brief description of a very powerful mechanism provided by
the Gtk HTML widget to embed arbitrary
language to create dynamic pages. This is similar to the
- History of changes to the package.
- General R bindings for Gtk, allowing access to Gdk, Gtk and Gnome.
- Higher-level R tools/functions using RGtk and RGtkHTML
to display different types of data and information.
The tools include
- a simple HTML browser,
- XML tree viewer,
- color-scheme browser,
- relational database viewer,
- S4 class relationship viewer,
- Gtk class, signal and property/arg viewer
- Extensions to RGtkViewers
that provides facilities for managing environments, etc.
for connecting R plugin components in HTML
to each other via embedded R code.
- Bindings for the gtk+extra library and its classes, including
a data grid/sheet that provides the basic display for a
- R plugin for Gnumeric
- A plugin for the Gnome spreadsheet Gnumeric.
We can use RGtk to access and construct GUIs in
Gnumeric since it is built using Gtk.
- An interface from R to GGobi.
We can access the Gtk components of GGobi using RGtk.
Additionally, GGobi has an extensive plugin mechanism
which allows one to write plugins in the S language.
One can add GUI components using RGtk. (See examples in the
R plugin module for GGobi.)
functions and access S objects as well as allowing S to call
- This package provides a mechanism for calling Python functions
from R and vice-versa. This is used in the automated generation
of the RGtk bindings between R and the C libraries of Gtk,
Gnome, etc. We use the parser of the defs files provided by
Duncan Temple Lang
Last modified: Sat May 31 12:08:12 EDT 2003