Install R + Rstudio in Ubuntu 18.04

1. Install R

sudo apt install r-base

2. Install Rstudio

a. download latest Rstudio version here
b. install
wget --tries=3 --timeout=120 http://ftp.ca.debian.org/debian/pool/main/g/gstreamer0.10/libgstreamer0.10-0_0.10.36-1.5_amd64.debwget --tries=3 --timeout=120 http://ftp.ca.debian.org/debian/pool/main/g/gst-plugins-base0.10/libgstreamer-plugins-base0.10-0_0.10.36-2_amd64.debsudo dpkg -i libgstreamer0.10-0_0.10.36-1.5_amd64.debsudo dpkg -i libgstreamer-plugins-base0.10-0_0.10.36-2_amd64.deb
Go to the download folder, open a terminal and run
sudo dpkg -i rstudio-1.1.447-amd64.deb

Issues with tidyverse

sudo apt-get install libcurl4-openssl-dev libssl-dev libxml2-devinstall.packages("cellranger")install.packages('tidyverse')library(tidyverse)