RStudio and Rattle Installation Assistance

We are going to use Rattle for the first few weeks of the course and then switch to RStudio. There are two ways to install Rattle and RStudio. The first way is installing RStudio and then Rattle inside of the RStudio platform. The second way is installing R and Rattle separately and then installing RStudio later on.

In this document, we describe the procedures for doing it with Rstudio first. To do it without Rstudio, just type the commands directly into the R interface. See the Rattle book, DMRR, for more details.

(1) R Studio Installation Guide

Find the right version of an installer for RStudio for your platform here and download it. Once it is downloaded, run the installer and the installation process will start shortly.

For more information about RStudio, please visit
The suggested video for the first week also shows how to install Rattle.

(2) Rattle Installation Guide 

  • Open RStudio and enter the following command at the prompt (the lower left-hand corner of the screenshot below).

rattle package command in RStudio

  • install.packages(“rattle”)

Enter the following two commands at the R prompt. This loads the Rattle package into the library and then starts up Rattle.

  • library(rattle)

To run the Rattle GUI on RStudio, type the following command:

  • rattle()

If a separate Rattle GUI pops up, you are set to go!

This should be enough on Windows systems.

(3) How to solve the dependency problems (Rattle needs RGtk2, XML, and CarioDevice)


Rattle will install other packages as needed but we can force the install of all other packages Rattle uses in one go if we so wish, using:

  • install.packages(“rattle”, dep=c(“Suggests”))

A longer explanation

If the RGtk2 package has yet to be installed, there will be an error popup indicating that libatk-1.0-0.dll is missing from your computer. Click on the OK and then you will be asked if you would like to install GTK+. Click OK to do so. This then downloads and installs the appropriate GTK+ libraries for your computer. After this has finished,  exit from R and restart it, so that it can find the newly installed libraries.

When running Rattle a number of other packages will be downloaded and installed as needed, with Rattle asking for the user’s permission before doing so. They only need to be downloaded just the once.

The installation has been tested [140720] to work on Microsoft Windows, 32bit and 64bit, XP, Vista and 7 with R 3.1.1, Rattle 3.1.0 and RGtk2 2.20.31.

Similarly for XML and CarioDevice packages, click on the OK when you are asked if you would like to install the packages.

(4) Optional for Windows

To use the Microsoft Windows theme engine, and thus have Rattle look like all other Windows applications (in terms of colour and style), create a file with the name gtkrc to contain the following line. Make sure the file name does not have any filename extension (i.e., no .txt or anything else with a dot). The file needs to be located in the GTK+ installation folder. This might be, for example, C:/Users/username/R/win-library/2.15/RGtk2/gtk/i386/etc/gtk-2.0/.

  • gtk-theme-name = “MS-Windows”

(5) Installing Rattle on a Mac

Former student Yicong Li figured out some very useful information. In the past, many Mac owners have had trouble installing Rattle. Here is what she learned, after considerable research. Also: It is worth repeating the regular Rattle install several times. The basic problem is that some additional libraries must be installed in order for Rattle to run. These libraries seem to install only gradually.

These instructions are from April 2017. They may need updating. Please give comments on this message, or mail them to the TA,,  if you run into additional installation problems. Also, respond if you have suggestions that might be helpful.

Hi Roger,
Just want to update with you that I think I found a solution for installing rattle packages.
Problem: run >library(rattle)  and get >error on install GTK+
Solution: Second answer from this site:
Note: No need re-install R or Rstudio, just install XQuartz and GTK+ from links provided.
Then run >install.packages(“rattle”, repos=”“, type=”source”)
It works on my Mac now. Hope it can help others that having the same problem.
Here is what I did on another machine and it worked.
Install XQuartz  from this link.

  1. Install GTK+ from this link.

>install.packages(“rattle”, dependencies = T)
This will work.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s