Skip to content

Automated Bash scripts to set up R workflow on Ubuntu: R (CRAN), tidyverse, RStudio Desktop, Shiny (R pkg), and Shiny Server. Includes a single `main.sh` orchestrator.

License

Notifications You must be signed in to change notification settings

Alek010/r-stack-ubuntu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ubuntu R Stack – Install & Test Scripts

Shell scripts to set up R environment on Ubuntu:

  • R base
  • tidyverse
  • RStudio Desktop
  • Shiny (pkg)
  • Shiny Server
  • main.sh
  • Docker tests

What each script does

install_r_ubuntu.sh - Installs R from the CRAN apt repo (noble/jammy/focal). --dev adds build tools & headers.

install_tidyverse_systemwide.sh - Installs tidyverse for all users (system-wide) and needed Ubuntu libraries.

install_rstudio_ubuntu.sh - Installs RStudio Desktop (stable → daily fallback), handles Ubuntu 24.04 t64 libs, and fixes libffmpeg.so on minimal images. Supports:

  • --no-runtime (skip extra GUI/Chromium libs)
  • --channel stable | daily | auto
  • --try-run (allows rstudio --version as root with --no-sandbox)
  • --force

install_shiny_systemwide_ubuntu.sh - Installs Shiny (R package) system-wide + common build/runtime libs.

install_shiny_server_ubuntu.sh - Installs Shiny Server with a choice of source:

  • --source ubuntu (APT, auto-updates),
  • --source upstream [--version X] (Posit .deb, newest).
  • Optional: --no-sample, --no-start, --force, --cran URL.

main.sh - Orchestrates the above via CLI flags or an interactive menu.

Non-interactive examples

Everything: R + tidyverse + RStudio + Shiny (R pkg)

  • bash main.sh --all --dev # add --dev to include compilers/headers
  • bash main.sh --all --no-dev

Individual pieces

  • bash main.sh --r-only --dev
  • bash main.sh --tidyverse-only
  • bash main.sh --rstudio-only
  • bash main.sh --shiny-only
  • bash main.sh --shiny-server-only

Extra flags via environment variables

RStudio installer flags (examples)

  • RSTUDIO_FLAGS="--try-run" bash main.sh --rstudio-only
  • RSTUDIO_FLAGS="--no-runtime --channel daily" bash main.sh --rstudio-only

Shiny Server installer flags (choose source)

  • SHINY_SERVER_FLAGS="--source ubuntu" bash main.sh --shiny-server-only
  • SHINY_SERVER_FLAGS="--source upstream --version 1.5.23.1030" bash main.sh --shiny-server-only

CRAN mirror for R package installs (tidyverse/shiny)

About

Automated Bash scripts to set up R workflow on Ubuntu: R (CRAN), tidyverse, RStudio Desktop, Shiny (R pkg), and Shiny Server. Includes a single `main.sh` orchestrator.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages