Installing Rattle on Mac

To start: Update your MacOS to version 10.13.3, which takes a little while. You also need Xcode, which can take 20 minutes

A. Download the two key files.

B.  One method for installing Rattle is available at https://zhiyzuo.github.io/installation-rattle/. This method does not require Xcode.

C. The second method is on this page.

It requires downloading Xcode, which takes a while, so start on it early. .  

1. upgrade your Mac operating system to High Sierra. 10.13.3
2. install Xcode which can be downloaded from App Store. This takes a long time (20 minutes).
3. In the following instructions, write these commands in your Terminal application (available in Applications/Utilities, shift-Cmd-U ). The preface “MyComputer$” will look slightly different on your machine.

MyComputer$ xcode-select -p
/Applications/Xcode.app/Contents/Developer

### If you see above line, you have xcode command line tools installed.
### If you don’t see that output, execute the command below:

MyComputer$ xcode-select –install

### Then, execute the commands below, in Terminal.

MyComputer$ export PATH=/opt/local/bin:/opt/local/sbin:$PATH

MyComputer$ sudo port selfupdate

MyComputer$ sudo port install pkgconfig

MyComputer$ sudo port install gtk2 +x11

MyComputer$ R CMD INSTALL ~/Downloads/RGtk2_2.20.34.tar.gz

MyComputer$ R CMD INSTALL ~/Downloads/cairoDevice_2.24.tar.gz

### The last two command lines depends on your file names and folders, so make sure that the name is consistent with your own files and folders. For example, when you download RGtk2 and cairoDevice, they may arrive with file names that look like RGtk2_2.20.34.tar (no .gz). If so, use the name on your system.

You can now quit Terminal and start Rstudio. Follow the regular instructions for installing Rattle. For example (from Rstudio, not from Terminal):

install.packages(“rattle”, repos=”https://rattle.togaware.com”, type=”source”)

library(rattle)

rattle()

 

Once you get this far, you should never have to install Rattle again. You can just run it, from Rstudio or from R. And you won’t have to install.packages again, either. Just:

library(rattle)

rattle()

D. Why all this trouble? – An educational discussion

Despite the inconvenience of this installation, there are some useful lessons here about modern software and software ecosystems. Rattle and R are both open-source software, meaning that no company is formally responsible for their development. Instead, they are built by volunteers (some of whom are paid by their employers to work on the software). The results are that the software is available for free, and portions of it may be very sophisticated, and better than anything available from conventional software companies.

But conversely, with open source software programs the robustness (it doesn’t break) and usability (non-specialists can use it ) depends on how popular that program is, which determines how much effort the open source software community puts into developing it. The core pieces of R and Rstudio are both heavily used and relatively well developed. Rstudio, on the other hand, is more limited. The inventory, Graham Williams,  as far as I can tell uses Linux and Windows, but does not use Macintosh software. Therefore, when he updates Rstudio he develops and tests it first for Windows. Other users then have to come along and test/adapt it for Mac. The same situation appears to be true for several packages that Rattle and many other R packages depend on.

The same situation applies to some packages that Rattle depends on, especially something called RGtk2. As of today (4/5/2018), the CRAN page for RGtk2 says the following:

Reference manual: RGtk2.pdf
Package source: RGtk2_2.20.34.tar.gz
Windows binaries: r-prerel: RGtk2_2.20.34.zip, r-release: RGtk2_2.20.34.zip, r-oldrel: RGtk2_2.20.31.zip
OS X binaries: r-prerel: not available, r-release: not available

In other words, there is no compiled (binary) version of version 2.20.34 of RGtk2 for Macintosh operating system. What you are doing in the above instructions is compiling it yourself, so that it will be available when Rattle wants it.

 

Advertisements

Author: Roger Bohn

Professor of Tech Management, UC San Diego. General blog https://Art2Science.org Rbohn@ucsd.edu

4 thoughts on “Installing Rattle on Mac”

  1. Hi again; However this one install.packages(“https://togaware.com/access/rattle_5.0.14.tar.gz”, repos=NULL, type=”source”) works!!! tks a lot its because people like you that R is such a great tool.

    Like

  2. Dear Roger , tks a lot for putting this together . Do you know if using R through Anaconda could be a issue? when i try to install install.packages(“rattle”, repos=”https://rattle.togaware.com”, type=”source”) in R-Studio i get the following error –Error: unexpected input in “install.packages(�” , , I been trying for the last 3 days to get rattle going but its been a real chalenge

    Like

  3. Hi there, when I ran sudo port selfupdate, there’s a password requirement and I have no idea what does it mean by password here, please help me, thank you.

    Like

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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