Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Getting started with R and RStudio

1. Install R

a. For Mac OS users, you can download R here.

  • For R ≥4.1.0 there is a separate build for ARM-based Macs (also known as ‘M1/M2/M3’ and ‘Apple Silicon’).
  • Xcode Command Line Tools needs to be installed for packages that require compilation - to install execute the following command in Terminal (or see here):
xcode-select --install

b. For Windows users, you can download R here.

c. For Linux users, you can download R here.

2. Install RStudio IDE

Download RStudio here
For tips on getting started, see the RStudio cheatsheet here

3. Updating R and RStudio

For more information on how RStudio and R interact, see here.

a. Mac OS:

  • Simply downloading and installing a new version of R should result in RStudio using the latest version.
  • By default RStudio will run against the current version of R.Framework.
  • List all of the versions of R.Framework on your system and determine which one is considered the current one by executing the following command in Terminal:
      ls -l /Library/Frameworks/R.framework/Versions/
    
  • To change the current version of R.Framework, you can either:
    a. Run the installer from CRAN for the R version you want to be current.
    b. Update the R.framework/Versions/Current directory alias directly using ln -s.
    c. Override the RSTUDIO_WHICH_R environment variable to the R executable that you want to run against (add to ~/.profile file):
      export RSTUDIO_WHICH_R=/usr/local/bin/R
    

b. Windows:

  • You may need to uninstall R to update it.
  • On Windows, RStudio uses the system's current version of R by default.
  • You can override which version of R is used via General panel of the RStudio Options dialog.
  • Another option for Windows users is to use a package called installr

c. Linux:

  • Simply downloading and installing a new version of R should result in RStudio using the latest version.
  • RStudio uses the version of R pointed to by the output of the following command:
      which R
    
  • To override the RSTUDIO_WHICH_R environment variable to the R executable that you want to run against (add to ~/.profile file):
      export RSTUDIO_WHICH_R=/usr/local/bin/R
    

d. Updating RStudio

  • Go to Help > Check for Updates > Quit and Download...
  • Download and install.

Alternatives to running R and RStudio locally

a. Data Studio on the CAVATICA platform NEED BILLING GROUP, TESTING

b. Posit Cloud NEED TO TEST

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors