Guys, great news! Follow Yihui’s comment below and use the 20-line code to install Rattle
without any effort! Just copy and paste the codes in R/RStudio - it just works like a charm!
Smart Labs 4.0 is designed as a collaborative collective between ratLABEDU and RVS School of Architecture, Chennai. It is an Integrated Programme to introduce basic, intermediate and advanced computational design techniques.
Note that you need to install Homebrew first (step 3 below). Next you can run Yihui’s code, which is copied below:
This document describes steps to successfully install Rattle
R Analytic Tool To Learn Easily on macOS 10.11 or above. If you have a macOS lower than 10.11, I recommend you upgrade your system to the newest one (10.12 macOS Sierra using App Store
. Without macOS 10.11 or above, you cannot install R 3.4
, let alone RGtk2
, which now only supports the newest R
version.
Throughout the steps to get your Rattle
working, we will be using Terminal
. You can open it by using Spotlight Search
(you can open it by command+space, which is the default shortcut). Type terminal
and you will be able to find it and open it.
Note that starting from step 7
, I mainly followed instructions on @williamtellme123
’s comment (the second to last)
---
. If your system is above 10.11, continue. Otherwise, upgrade it to Sierra
.
homebrew
, which is a very convenient package manager for macOS
. Copy the following command in terminal and hit Enter: Follow the instructions to get brew
ready. When inputing your password, nothing will show up for security reasons. Just hit Enter when you’re finished.
brew
is finished, copy the following command in terminal and hit Enter: R
version: If yours is 3.4
, continue. Otherwise, upgrade it.
brew
to change the way it wants to install gtk+
. A text editor window will pop up. Note that if you are not familiar with vim
, run export EDITOR=emacs
in terminal before the line above to force using emacs
, where you can use it as other common text editors. Find where there is something like this:
The original version that you just opened will be exactly the same, except the bottom two lines. Replace the whole chunk by this one. Then hit ctrl+xctrl+c, followed by y to quit emacs
.
gtk+
by: After installation succeeds, run this in terminal: echo 'export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/lib/pkgconfig/gtk+-2.0.pc:/opt/X11/lib/pkgconfig' >> ~/.bash_profile
. Otherwise, gtk+
will not be recognized.
Download the newest source file for RGtk2
from https://cran.r-project.org/web/packages/RGtk2/index.html.
~/Downloads
. Run the following in terminal: Note that versions may vary depending on when you download the source file. Use the exact filename that sits in the directory. (Tip: use tab to help autocomplete.)
When it finishes, open XQuartz
by using spotlight search
.
A window that’s very similar to terminal will pop up. Type r
and hit enter to open R
.
R
, run: rattle
library: Rattle
will show up and it may ask you whether to install XML
and cairoDevice
. Click yes for both and you should be good to go now.