Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

r

rattle

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.

like image 370
Edward M. Avatar asked May 18 '17 11:05

Edward M.


2 Answers

One possible solution as mentioned is to install an older version of RGtk2. For Windows this might be:

install.packages("https://cran.r-project.org/bin/windows/contrib/3.3/RGtk2_2.20.31.zip", repos=NULL)

Further suggestions can be found at https://rattle.togaware.com/rattle-install-troubleshooting.html

like image 138
Graham Williams Avatar answered Oct 21 '22 04:10

Graham Williams


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

like image 40
Ahmed Laatabi Avatar answered Oct 21 '22 05:10

Ahmed Laatabi