![rstudio for mac 3.3.2 rstudio for mac 3.3.2](http://mercury.webster.edu/aleshunas/R_learning_infrastructure/images/About%20RStudio%20(Windows).png)
The which command performs a search for the R executable using the system PATH. On Linux, RStudio Desktop IDE, RStudio Server Open Source, and RStudio Workbench (previously RStudio Server Pro) all use the version of R pointed to by the output of the following command: which R Note that in order for RStudio to see this environment variable it needs to be launched from a terminal where the variable has been set to the desired value and exported. For example, to force RStudio to use the R executable located at /usr/local/bin: export RSTUDIO_WHICH_R=/usr/local/bin/R If you want to override the version of R selected by RStudio's default behavior then you can set the RSTUDIO_WHICH_R environment variable to the R executable that you want to run against.
![rstudio for mac 3.3.2 rstudio for mac 3.3.2](https://image.z.itpub.net/zitpub.net/JPG/2020-06-17/F9DAEAE804B9EC01C756381AAE72BB8E.jpg)
If the RStudio IDE is not able to locate R by scanning these locations, it will fall back to using whatever version of R is located at /Library/Frameworks/R.framework/. In order to support these variations, RStudio scans for the R executable in the following sequence: However, if R is installed directly from source or via a package manager like MacPorts or Homebrew, then the R executable is installed to either /usr/local/bin/R (Homebrew) or /opt/local/bin/R (MacPorts). When R is installed from CRAN on OS X, the R executable is installed at /usr/bin/R. R from source (including MacPorts and Homebrew)
![rstudio for mac 3.3.2 rstudio for mac 3.3.2](https://www.getintodesktop.com/wp-content/uploads/2019/12/FontLab-7.0-Free-Download3-e1576945941261.jpg)
Since R versions can be installed side-by-side on a system, RStudio needs to select which version of R to run against. The RStudio IDE requires R version 3.0.1 or higher.