RStudio and Rattle Installation Guide

We are going to use Rattle for the first few weeks of the course and then switch to RStudio. There are two ways for installing Rattle and RStudio.

The first way is installing RStudio and then Rattle inside of the RStudio platform.

The second way is installing R, Rattle separately and then installing RStudio later on.

In this document, we describe the procedures for the first way of installation.

 


(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 https://www.rstudio.com/products/rstudio/download/

(2) Rattle Installation Guide (Please read the whole thing before you start)

  • 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!

 

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

TL;DR

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, do 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.

Optional

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”

Advertisements