Skip to content

Instantly share code, notes, and snippets.

@DecisionNerd
Created January 9, 2018 18:29
Show Gist options
  • Save DecisionNerd/61cb2c828e1a57e43079a6df16dfa1a0 to your computer and use it in GitHub Desktop.
Save DecisionNerd/61cb2c828e1a57e43079a6df16dfa1a0 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Adds R to apt and install it
#
# Instructions:
# sudo chmod 700 InstallR.sh
# ./FirstTimeInstallR.sh
# Install R
sudo echo "deb http://cran.rstudio.com/bin/linux/ubuntu xenial/" | sudo tee -a /etc/apt/sources.list
gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
gpg -a --export E084DAB9 | sudo apt-key add -
sudo apt-get update
sudo apt-get install -y r-base r-base-dev
sudo apt-get install -y libcurl4-openssl-dev libssl-dev libxml2-dev
sudo R CMD javareconf
# install RStudio 1.1.383 - Ubuntu 16.04+/Debian 9+ (64-bit)
# Link and version at: https://download1.rstudio.org/rstudio-xenial-1.1.383-amd64.deb
sudo apt-get install gdebi-core
wget https://download1.rstudio.org/rstudio-xenial-1.1.383-amd64.deb
sudo gdebi -n rstudio-xenial-1.1.383-amd64.deb
rm rstudio-xenial-1.1.383-amd64.deb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment