Skip to content

Instantly share code, notes, and snippets.

@alwinw
Last active January 6, 2023 05:27
Show Gist options
  • Select an option

  • Save alwinw/0489eecbe1467e7d5ba1a6a190115a2b to your computer and use it in GitHub Desktop.

Select an option

Save alwinw/0489eecbe1467e7d5ba1a6a190115a2b to your computer and use it in GitHub Desktop.
Getting up and running with R on Linux fast with a single script
# Configuring R for Package Developers on Linux
# Assumes you are using a Ubuntu-based distro
# Tested and working on Pop!_OS 22.04 LTS in 2023
# 1. System Requirements
sudo apt install -y build-essential
# 2. Install R
sudo apt update
sudo apt install -y r-base r-base-dev
# 3. Installing RStudio IDE
cd /tmp/
wget https://download1.rstudio.org/electron/jammy/amd64/rstudio-2022.12.0-353-amd64.deb
sudo apt install ./rstudio-2022.12.0-353-amd64.deb
rm rstudio-2022.12.0-353-amd64.deb
# 4. Installing R Dev Packages
sudo apt install -y \
libfontconfig1-dev \
libcurl4-openssl-dev \
libharfbuzz-dev \
libfribidi-dev \
libfreetype6-dev \
libpng-dev \
libtiff5-dev \
libjpeg-dev \
pandoc \
qpdf
Rscript -e 'install.packages(c("devtools", "goodpractice", "pkgdown", "rcmdcheck", "rmarkdown", "roxygen2", "spelling", "usethis"))'
# 5. Installing R Tooling Packages
Rscript -e 'install.packages(c("codemetar", "covr", "renv", "styler", "testthat"))'
pip3 install -U radian
# 6. Installing tidyverse
sudo apt install -y \
libcurl4-openssl-dev \
libssl-dev \
libxml2-dev
Rscript -e 'install.packages("tidyverse")'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment