Shell scripts to set up R environment on Ubuntu:
- R base
- tidyverse
- RStudio Desktop
- Shiny (pkg)
- Shiny Server
main.sh- Docker tests
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.
- bash main.sh --all --dev # add --dev to include compilers/headers
- bash main.sh --all --no-dev
- 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
- RSTUDIO_FLAGS="--try-run" bash main.sh --rstudio-only
- RSTUDIO_FLAGS="--no-runtime --channel daily" bash main.sh --rstudio-only
- 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=https://cloud.r-project.org bash main.sh --shiny-only