Loading...
Loading...

Installing R and RStudio

Get started with R by installing these two essential components:

  1. R: The core programming language
  2. RStudio: The best IDE for working with R

1. Installing R

Windows

  1. Go to CRAN for Windows
  2. Download the latest version
  3. Run the installer (use default options)

macOS

  1. Visit CRAN for macOS
  2. Download the .pkg file for your version
  3. 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

  1. Go to RStudio Download
  2. Choose the FREE version (RStudio Desktop)
  3. Download the installer for your OS
  4. Run the installer with default settings

3. First Run Setup

  1. Open RStudio
  2. Verify installation by typing in the console:
    print("Hello R!")
  3. 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"
0 Interaction
0 Views
Views
0 Likes
×
×
×
🍪 CookieConsent@Ptutorials:~

Welcome to Ptutorials

$ Allow cookies on this site ? (y/n)

top-home