Skip to content

Instantly share code, notes, and snippets.

@mlgrm
Last active June 12, 2019 12:24
Show Gist options
  • Save mlgrm/ee6d3a6239753a978486d5c4e1bf0dcd to your computer and use it in GitHub Desktop.
Save mlgrm/ee6d3a6239753a978486d5c4e1bf0dcd to your computer and use it in GitHub Desktop.
install the most recent version of R, rstudio and the tidyverse on ubuntu 18.04
#!/bin/bash
# usage: sudo true && curl -sL bit.ly/mlgrm-install-rstudio | bash
set -e
sudo apt install software-properties-common
sudo apt-key adv --keyserver keyserver.ubuntu.com \
--recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo apt-add-repository \
"deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/"
sudo apt-get update
sudo apt-get install -y \
r-base \
r-base-dev \
r-recommended \
libjpeg62 \
libjpeg-turbo8-dev \
libgstreamer-plugins-base1.0-dev
xdg-open https://www.rstudio.com/products/rstudio/download/#download
#url=$(
#curl -sL https://www.rstudio.com/products/rstudio/download/#download | \
# grep -E "https://download1.rstudio.org/rstudio-(xenial|bionic)-[0-9.]+-amd64.deb" | \
# grep -o '".*"' | \
# tr -d '"'
#)
#deb=$(mktemp --suffix .deb)
#curl -sL $url > $deb
#sudo dpkg -i $deb
sudo Rscript -e "install.packages('devtools')"
sudo Rscript -e "install.packages('tidyverse')"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment