R | Rcmdr ; Rattle on R3.1 and Mac OSX yosemite
Today I tried to install Rcmdr on my MBP( yosemite ) and found that it was the installation was not successful and kept throwing a lot of errors and also some of the dependancies packages were not getting installed. I also noticed that some of the dependancies are not available for R.3.1 and yosemite.
After spending a lot of time googling and trial and error, now I got everything working
Steps to do
Rcmdr
Now go to R-Console (or R-studio) and type
the screen should look something like this
Steps to do
- Since Rcmdr uses xWindows system, we need a OSX version of the same. So make sure you have installed the Quartz(X11) from this site -http://xquartz.macosforge.org/landing/
- Install macports - https://www.macports.org/install.php
- Make sure you have already installed the Xcode. Since some of the dependancies binaries are not available for the current R version, we might have to compile them from source
- Download RGtk2 source and cairoDevice source from CRAN ( download the "packaged source")
- run the below code.(one by one)
export PATH=/opt/local/bin:/opt/local/sbin:$PATH sudo port selfupdate sudo port install pkgconfig export PATH=/opt/pkgconfig/bin:$PATH sudo port install gtk2 +x11 export PKG_CONFIG_PATH=/opt/local/lib/pkgconfig R CMD INSTALL [Rgtk2...gz file(downloaded in step4)] R CMD INSTALL [cairodevice...gz file(downloaded in step4)] Sys.setenv(PATH=paste0("/opt/pkgconfig/bin:",Sys.getenv("PATH"))) Sys.setenv(PKG_CONFIG_PATH="/opt/local/lib/pkgconfig") install.packages("RGtk2", type="source") install.packages("cairoDevice", type="source") install.packages("rattle", type="source")
Now go to R-Console (or R-studio) and type
library(Rcmdr)and you should see a window pop-up like below
Rattle
The rattle GUI gives access to a range of multivariate graphics, regression and classification routines.
library(rattle) rattle()
the screen should look something like this
ref: http://marcoghislanzoni.com/blog/2014/08/29/solved-installing-rattle-r-3-1-mac-os-x-10-9/
Comments