Install and open RStudio. You should see four panels as described in Session 2.
Step 3: Install Required Packages
Open RStudio and run the following code in the Console (bottom-left panel):
Code
# Core packages for the workshopinstall.packages(c(# Data manipulation and visualization"tidyverse","ggplot2","knitr","DT","DiagrammeR",# Health economics modelling"heemod","dampack","BCEA",# Survival analysis"survival","survHE","flexsurv",# Interactive apps"shiny","shinydashboard",# Document rendering"quarto","rmarkdown"))
This may take 10-15 minutes depending on your internet connection.
Step 4: Verify Installation
Run this code to check that all packages installed correctly:
---title: "Setup Guide"subtitle: "Installing R, RStudio, and required packages"format: html: toc: true---## Step 1: Install RDownload and install R from [CRAN](https://cran.r-project.org/):- **Windows:** Click "Download R for Windows" → "base" → download the `.exe` file- **Mac:** Click "Download R for macOS" → download the `.pkg` file- **Linux:** Follow instructions for your distribution**Recommended version:** R 4.3.0 or later.## Step 2: Install RStudioDownload RStudio Desktop (free) from [Posit](https://posit.co/download/rstudio-desktop/).Install and open RStudio. You should see four panels as described in Session 2.## Step 3: Install Required PackagesOpen RStudio and run the following code in the Console (bottom-left panel):```{r}#| label: install-packages#| echo: true#| eval: false# Core packages for the workshopinstall.packages(c(# Data manipulation and visualization"tidyverse","ggplot2","knitr","DT","DiagrammeR",# Health economics modelling"heemod","dampack","BCEA",# Survival analysis"survival","survHE","flexsurv",# Interactive apps"shiny","shinydashboard",# Document rendering"quarto","rmarkdown"))```This may take 10-15 minutes depending on your internet connection.## Step 4: Verify InstallationRun this code to check that all packages installed correctly:```{r}#| label: verify#| echo: true#| eval: falsepackages <-c("tidyverse", "ggplot2", "knitr", "DT", "DiagrammeR", "heemod","dampack", "BCEA", "survival", "survHE", "flexsurv","shiny", "shinydashboard", "quarto", "rmarkdown")for (pkg in packages) {if (require(pkg, character.only =TRUE, quietly =TRUE)) {cat("[OK]", pkg, "installed successfully\n") } else {cat("[FAIL]", pkg, "-- try reinstalling with install.packages('", pkg, "')\n") }}```## Step 5: Open the Workshop Project1. Download or clone this repository2. In RStudio, go to **File → Open Project**3. Navigate to the workshop folder and open `HTA-R-Workshop-2026.Rproj`4. You are ready to begin!## Troubleshooting**"Package not available" error:** Your R version may be too old. Update R to version 4.3 or later.**Installation hangs:** Try installing packages one at a time instead of all at once.**Behind a proxy/firewall:** Ask your IT department for proxy settings, then run:```rSys.setenv(http_proxy ="http://your-proxy:port")Sys.setenv(https_proxy ="http://your-proxy:port")```