The REventLoop package
This is an experimental and example package that provides a mechanism
to use an alternative event loop within R. It allows the user to
replace R's read-eval-print loop (REPL) with a more common event loop
such as Gtk, Tcl/Tk,and potentially others. This makes the GUIS more
repsonsive and also allows us to transparently access the timers and
idle tasks within those toolkits. We can also run nested event loops
to block R evaluation while still processing events and R callbacks.
Additionally, we can switch between different event loops (e.g Gtk and
Tk) and add one event source to the other (e.g. handle all Gtk events
within the Tk event loop). The package provides an implementation of
a callback for handling input for R using readline adapted from the
one in R so it can be used with different event loops..
Currently, the package works only on Unix. Hopefully, in the future,
the abstraction will be further generalized to include Windows and Mac
OS X. The latter seems reasonably compatible.
The package is an example of using XML, but will be useful in its own
right. There are several details that need to be fixed but the basic
approach might be useful for people to build upon.
Download
- REventLoop_0.2-3.tar.gz
-
Installation requires either or both
of the Gtk and Tcl/Tk libraries.
This is only working for Unix at present.
Documentation
-
- A guide to using the package.
-
Gives a high-level view of using the package with
examples and discusses some of the details in a reasonably
non-technical manner.
-
- Event Loop Data Structure
- Created by doxygen.
-
- Some more technical implementation/API notes.
-
More technical notes.
-
- The R manual for this package.
- The Rd files combined into a PDF file.
-
- Examples
-
Duncan Temple Lang
<duncan@research.bell-labs.com>
Last modified: Wed Oct 9 14:58:58 EDT 2002