2. Installation of Base R and RStudio


2.1 Why Do We Need Both Base R and RStudio?

  • Base R is the engine that runs the R programming language. It’s like the core of the car that makes everything work.
  • RStudio is the user-friendly dashboard that makes working with R easier. It’s like the control panel of the car—making it easier to drive and explore what’s under the hood.


baseR RStudio



2.2 Steps to Install Base R and RStudio

Here’s how to get started:

  1. Install Base R:
    • Go to the CRAN website: https://cran.r-project.org/
    • Choose your operating system:
      • Windows: Download R-X.X.X-win.exe and follow the installation instructions.
      • Mac: Download R-X.X.X.pkg and install it.
      • Linux: Follow the specific instructions for your distribution.
    • Complete the installation.
  2. Install RStudio:
    • Visit the RStudio download page: https://posit.co/download/rstudio-desktop/
    • Download the installer according to your operating system:
      • Windows: Download the .exe file.
      • Mac: Download the .dmg file.
      • Linux: Follow the provided instructions.
    • Install RStudio by running the downloaded file and following the setup process.

Again, you need to do both 1&2 for you to be able to work on RStudio.


Optional alternative: you don’t need to do this if you do 1&2 already. For iPads or those who don’t want to install software on your device as you will only need a browser like Google Chrome.

  1. Use RStudio Cloud:

    • If you’re on an iPad or want to avoid installing RStudio on your device, you can use RStudio Cloud. This is an online version of RStudio that runs in your browser.
    • Go to: https://posit.cloud/
    • Create a free account and start a new RStudio project.
    • You can upload your scripts and data to the cloud and run R just like you would in the desktop version.
    • We do not recommend working on iPads as there will be lots of typing.

Previous: 1. Why R Programming? | Table of Contents | Next: 3. Exploring R Basics