Introduction
- Both R and RStudio are free, open-source software, available for all commonly used operating systems, including Windows, macOS, and Linux systems.
Installing R for Windows
- Go to the Comprehensive R Archive Network (CRAN) and select a mirror site; a list of CRAN mirrors shows up at the upper left of the CRAN home page. I recommend you use the 0-Cloud mirror, which is the number one on the list. Click on the link Download R for Windows, which appears near the top of the page; then click on install R for the first time, and subsequently on Download R a.b.c for Windows (where \(a.b.c\) is the latest version of R). Once it is downloaded, double-click on the R installer. You may take all of the defaults.
Installing R on macOS
- Go to the Comprehensive R Archive Network (CRAN) and select a mirror site; a list of CRAN mirrors appears at the upper left of the CRAN home page. I suggest that you use the 0-Cloud mirror, which is the first on the list. Click on the link Download R for MacOS X, which appears near the top of the page; then click on R-a.b.c.pkg (where \(a.b.c\) is the current version of R), which assumes that you are using macOS 10.11 (El Capitan) or higher. You’ll also find older versions of R if you have an older version of macOS. Note: As a general matter, you’re probably better off updating your macOS to the current version.
- Once it is downloaded, double-click on the R installer. You may take all of the defaults.
Installing RStudio
- Go to the RStudio Download website, select the free version of RStudio Desktop, scroll down to Installers for Supported Platforms, and click on the link to the appropriate installer for your operating system (Windows, macOS, or Linux distro). Visit the RStudio website for more information about RStudio.
- Once it is downloaded, run the RStudio installer and take all of the defaults: In Windows, double-click on the RStudio installer to start the installation; in macOS, double-click on the downloaded RStudio disk-image file, and drag the RStudio icon to the Applications folder.
- When you first run RStudio, it should detect your R installation and start the R console. To configure RStudio to your taste, select Tools \(>\) Global Options (Windows) or RStudio \(>\) Preferences (macOS) from the RStudio menus.
RStudio Cloud (Highly recommended)
- RStudio Cloud is a hosted version of RStudio in the cloud.
- It is an easy way for people to share, learn, and teach statistics and data science using R.
- If you choose to use RStudio cloud, you don’t have to download and install R and RStudio.
- I highly recommend you using R via RStudio Cloud.
- Watch this video to learn how to setup RStudio Cloud. It also shows you how to work with R in Cloud as well as setting up RStudio Cloud environment.
Importing Files and Datasets to RStudio Cloud (Very Important)
- Uploading a file to a cloud RStudio instance

- This video shows you how to import files and datasets into RStudio Cloud.
References
- Fox, J. (2019). Introduction to the R Statistical Computing Environment. Ontario, Canada.
- Rai, B (2019). Working with R in Cloud | RStudio Cloud. Massachusetts, USA.
- Smith, A (2018). RStudio Cloud Setup.