Interfaces to the Qt framework from R

The goal of this project is to create a coherent collection of R packages that provide an interface to the Qt application and UI framework, with a focus on enabling GUI development and advanced graphics.

The project is still in a development phase, and there is little documentation. However, it should be possible to install the packages (from source) in the usual way on GNU/Linux or Mac OS X systems provided you have installed the Qt libraries and development packages and the cmake build system.


Qt 4.6 or better is required for these packages. Qt binaries can be downloaded from this website for Windows, Mac, and GNU/Linux. The smaller "Framework Only" download is sufficient.
Cmake 2.8.1 or better is also required. Binaries can be downloaded from here.
git is required to obtain the sources. Binaries can be downloaded from here.

Note that even though all dependencies are available on Windows, the R packages themselves do not run on Windows (yet). Windows support is feasible, but involves a little more work, and is planned once the packages are more stable.

Most GNU/Linux distributions should have packages for the dependencies; e.g., on Debian, it should suffice to

$ sudo apt-get install qt4-dev-tools libqt4-dev \
       libqt4-opengl cmake git

Getting and installing the software

The software produced by this project is available in the form of several R packages. The most important of these are qtbase, which provides R bindings to (most of) the Qt library, and qtpaint, which provides a low-level framework for high-performance graphics. Other packages are expected to build on these packages to provide interfaces more directly useful for the end-user.

Primary hosting of the source code is at Github. To download and install qtbase, try

$ git clone
$ R CMD INSTALL qtbase

This will take a long time the first time. When you want to update to the latest version a few days later, do

$ cd qtbase
$ git pull
$ cd ..
$ R CMD INSTALL qtbase

This should fetch the latest version of the source and install it, but installation should take less time. For a completely clean install, do

$ cd qtbase/src
$ make clean
and install again.

The process for installing qtpaint is similar:

$ git clone
$ R CMD INSTALL qtpaint

Other packages currently part of the project are

These can be installed in a similar fashion, although for these packages it is recommended that you go through the

$ R CMD build foo
$ R CMD INSTALL foo_x.y.z.tar.gz
cycle to keep the source clean. (This is also possible qtbase and qtpaint, but not recommended because of the long time required for a clean installation.)


The best way to get involved is to look at the archived mailing list discussions and then start asking questions there.

For development access, create an account at Github and send email to the list. Once you have been granted access, follow the instructions at Github. If you are new to git, this site should help you get up to speed.

Other resources

For mailing lists and bug tracking, see the R-forge project summary page.


Some of the packages have demos in the demo directory. Some are obsolete, but others are useful. Both qtbase and qtpaint have a vignette. See also the qtbase/NOTES file for some thoughts.

Slides and scripts from UseR! 2009 and DSC 2009 are given below. These are obsolete for all practical purposes, but do give a high-level background that may be useful in the absence of more up-to-date material.