Chapter 2 Install R & RStudio
2.1 R
If you prefer written instructions over video, follow these steps:
- Download R for your operating system from a CRAN mirror (Windows, macOS, or Linux installers are listed there).
- Run the installer with default options.
- Verify the installation by opening a terminal and running
R.version.string.
2.2 RStudio
If you prefer written instructions over video, follow these steps:
- Download RStudio Desktop from posit.co/download/rstudio-desktop.
- Install it after installing R (RStudio needs R to work).
- Open RStudio and create a new project via File > New Project (this creates
an
.Rprojfile that keeps your working directory, history, and settings together). - Verify your setup by running
R.version.stringin the R console.