gWidgetsWWW
Description
This package provides an implementation of the gWidgets API for use on the web. It requires the Rpad package for R and the EXTJS Libraries for javascript.The programmer creates a webpage and within some tags, the gWidgets R code is placed. Examples exists in the Examples directory after installation.
A static example (not using Rpad because if it is installed improperly it can be a security risk see this) can be seen here widgets.html.
Installation
The Rpad package installs both a local and server version. The server version should be installed with care, as there is a potential security issue if steps are not taken.The EXTJS libraries are installed by a) downloading them and b) placing them in the proper place on your website. If you are using the local version, then they can be placed in the directory where you will run Rpad. If installed elsewhere, the links in the examples will need changing.
The stock icons (which need redoing) are in the images directory of the package. This directory needs to be copied to the images directory as referred to in a url. For the local version of Rpad, this is the directory from which it is run.
OS Specific issues:
Linux
Rpad installed fine. Works well with the firefox browser.Mac OS X
Rpad installed fine. As of version 2, it is working with safari.Windows
Untested. Please report errors.untested browsers
not tested yet with opera, IE, ???Examples
Several examples are given in the Examples directory of the package after installation. If using the local version of Rpad, these can be copied to the directory from which Rpad is run to run.There are examples on the widgets, containers, the ggooglemaps widget and an example GUI for a t-test.
Debugging
Error messages are pretty uninformative. The message:
DEBUG: XMLHttpTransport error callback failed: ReferenceError: props
is not defined
appears when an error occurs. This may be due to
- a typo in your R commands. Try to run them from the R process from which Rpad is running (running locally)
- A lack of HTML escaping, such as using a quote or < symbol. These are supposed to be programmed around in the package. If you find this error, please email. A quote can be escaped with two slashes.
- a bug in gWidgetsWWW. There are probably many. Please email.
Documentation
The main source for documentation is in the package gWidgets. Differences from that API spelled out there in the help files are documented (hopefully) in the help page for gWidgetsWWW which can be read with
?gWidgetsWWW
The gWidgets API is in need of fine tuning, but for the most
part is spelled out in these pages.
The gWidgets package also has a vignette with many examples. As of version 0.0-29 this is in need of updating, so some examples may not work.
The gWidgets website has several examples available to try out.
Other R packages using gWidgets
The packages FAir, playwith, and pmg use gWidgets. They can be consulted as another source of examples, although all use the RGtk2 version.07/18/2008: New package gWidgetsWWW
The gWidgetsWWW package leverages the Rpad infrastructure allow
dynamic webpages to be built using the gWidgets API. In addition the
Rpad package for R, these pages use the EXTJS javascript libraries
available at www.extjs.com.
Att this point, much of the gWidgets API is implemented, but certainly
not all. In addition, some extenstions are being tried out. The
gaction contructor is used to make reusable action components for
menubars and buttons. The ggooglemaps constructor gives some access to
the Google maps interface.
Bug reports and comments are welcome.