Weledi Weledi
Sign In
All articles
Article 26 May 2026

Install R and RStudio

R is the language; RStudio is the editor most data folks use to write it.
You install them in that order.

## 1. Install R

Visit **cran.r-project.org**, click the download link for your OS, and run
the installer. Accept the defaults — R doesn't ask hard questions during
setup.

## 2. Install RStudio Desktop

Visit **posit.co/download/rstudio-desktop** and download the **free**
edition. The paid one is for enterprise teams; you don't need it.

## 3. Verify

Open RStudio. In the **Console** pane, type:

```r
1 + 1
```

If it prints `[1] 2`, you're done.

## 4. Install the tidyverse

Most modern R work uses the tidyverse — a collection of packages for
clean, readable data manipulation. In the Console:

```r
install.packages("tidyverse")
```

It will download a few packages. Wait until you see `>` again.

## Try it

```r
library(tidyverse)
data <- tibble(score = c(82, 76, 91, 65))
mean(data$score)
```

You should see `78.5`. That's the average.

## Tip

Save your scripts as `.R` files inside an **RStudio Project** (File →
New Project). It keeps your work organised and your file paths sane.

Want to go deeper with a tutor?