Error in installing packages 'RGtk2' and 'rattle' in R

Viewed 18362

I tried to install R packages 'rattle' but when I typed

install.packages('rattle')

it returns

Warning in install.packages :
dependency ‘RGtk2’ is not available

So I tried install 'RGtk2',

install.packages('RGtk2')

it returns

Warning in install.packages :
package ‘RGtk2’ is not available (for R version 3.2.3)

My computer is windows 8.1, R version 3.2.3 and I'm working on the R studio.

4 Answers

For linux users, this worked for me :

install.packages("https://cran.r-project.org/src/contrib/Archive/RGtk2/RGtk2_2.20.30.tar.gz", repos=NULL)

RGtk2 installed, you can run install.packages("rattle")

You may also need to install libgtk2.0-dev and libxml2-dev before installing RGtk2 !

Conf : Ubuntu 16.10 (yakkety) and R version 3.3.1

I use macOS and used the following instructions to sought this out.

Step 1:

brew install gtk+
brew install --with-x11 cairo

Step 2:

install.packages("rattle")

There would be loads of red lines on the console, while you're installing rattle, but it's OK. It will work out.

Related