Installing R and RStudio
Get started with R by installing these two essential components:
- R: The core programming language
- RStudio: The best IDE for working with R
1. Installing R
Windows
- Go to CRAN for Windows
- Download the latest version
- Run the installer (use default options)
macOS
- Visit CRAN for macOS
- Download the .pkg file for your version
- Open and follow the installation wizard
Linux
Use your package manager:
# Debian/Ubuntu
sudo apt-get install r-base
# Fedora
sudo dnf install R
# Arch Linux
sudo pacman -S r
2. Installing RStudio
- Go to RStudio Download
- Choose the FREE version (RStudio Desktop)
- Download the installer for your OS
- Run the installer with default settings
3. First Run Setup
- Open RStudio
- Verify installation by typing in the console:
print("Hello R!") - Install essential packages (run in console):
install.packages(c("tidyverse", "ggplot2", "dplyr"))
4. Recommended Configuration
Adjust these settings in RStudio (Tools > Global Options):
- Appearance: Choose a dark theme (easier on eyes)
- Pane Layout: Move Console to top-right
- General: Uncheck "Restore .RData"
×