Skip to content

Instantly share code, notes, and snippets.

@ccortezb
Last active May 13, 2019 19:29
Show Gist options
  • Save ccortezb/8aed98b41818105725c4c416ae0c2ec8 to your computer and use it in GitHub Desktop.
Save ccortezb/8aed98b41818105725c4c416ae0c2ec8 to your computer and use it in GitHub Desktop.
install R 3.3.1 on Elementary OS loki with R studio RGTK 2.2 and Rattle for Data mining
# Get R (base) and a few dependencies for packages
sudo apt-get -y install r-base libapparmor1 libcurl4-gnutls-dev libxml2-dev libssl-dev
sudo su - -c "R -e \"install.packages('tidyverse', repos = 'http://cran.rstudio.com/')\""
sudo su - -c "R -e \"install.packages('devtools', repos='http://cran.rstudio.com/')\""
sudo su - -c "R -e \"devtools::install_github('daattali/shinyjs')\""
sudo su - -c "R -e \"install.packages('rmarkdown', repos='http://cran.rstudio.com/')\""
# install java8
sudo apt install openjdk-8-jdk
# edit file
sudo vim /etc/apt/sources.list
# add this line
deb https://cloud.r-project.org/bin/linux/ubuntu xenial/
# download R 3.3.1 source
wget https://cran.r-project.org/src/base/R-3/R-3.3.1.tar.gz
tar xzfv R-3.3.1.tar.gz
cd R-3.3.1/
# prepare compilation and install
./configure --prefix=/home/kazz/R331 --enable-R-shlib=yes --with-readline=no --with-x=no
make
make check
sudo make install
sudo ln -s /home/kazz/R331/lib/R/lib/libR.so /usr/local/lib/R/lib/libR.so
#download R studio
wget https://download1.rstudio.org/rstudio-xenial-1.1.383-amd64.deb
sudo dpkg -i rstudio-xenial-1.1.383-amd64.deb
#install dependencies for RGTK2.2
sudo apt-get install libgtk2.0-dev
sudo apt-get install libgtk2.0
### In R Studio ###
#install rattle package for data mining in linux
install.packages("https://cran.r-project.org/src/contrib/Archive/RGtk2/RGtk2_2.20.31.tar.gz", repos=NULL)
.rs.restartR()
library(rattle)
rattle()
@xaees
Copy link

xaees commented May 13, 2019

you are genius man. i was about to leave linux because of this installation as it was not working for me although i tried every way. Lots of Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment