Anaconda RStudio: How to Download & Install on Windows/Mac
โก Smart Summary
RStudio is the integrated development environment most R users work in, and Anaconda can supply R, RStudio and their packages from one conda installation. Both installation routes are walked through below for Windows and macOS.
What is R?
R is a programming language for statistics and data analysis. To work in R comfortably, we also install an Integrated Development Environment (IDE). RStudio is the most widely used IDE for R because it is user-friendly and open source, and it is one of the applications Anaconda can install for you.
RStudio is developed by Posit, the company formerly called RStudio, PBC. It is an editor rather than a language, so it needs an existing R installation to run against โ RStudio Desktop requires R 3.6.0 or newer.
What is Anaconda?
Anaconda is a free, open-source distribution of both Python and the R programming language. It is widely used in the scientific community and by data scientists to carry out machine learning projects and data analysis.
Why use Anaconda?
Anaconda helps you manage all the libraries required for Python and R in one place. It installs the libraries and the IDE into a single folder to simplify package management. Otherwise, you would need to install each piece separately.
โ ๏ธ Version note (2025): Anaconda deprecated its R channel on 4 November 2025 and no longer ships new R versions, package updates or security fixes there. Existing packages stay downloadable and existing environments keep working, but for a current R stack Anaconda now points users at conda-forge or a native CRAN installation. Every conda command below still runs; just expect older package builds from the r channel.
Install R and RStudio Without Anaconda
If you only want R and RStudio and not the wider conda toolchain, the two-installer route is shorter and always current. It is also the route Posit documents.
- Step 1) Install R first. Download the installer for your operating system from CRAN and run it with the default options. RStudio cannot start without it.
- Step 2) Install RStudio Desktop. Download the free Open Source edition from the Posit download page. Windows needs a 64-bit Windows 10 or newer, and macOS needs Sonoma (14) or newer.
- Step 3) Launch RStudio. It detects the R installation automatically and shows the R version in the Console when it opens.
To confirm that the two are connected, type one line in the Console:
# Type this in the RStudio Console after installing R.version.string # reports the R build RStudio is attached to
Choose Anaconda instead when you also work in Python, when you want conda to resolve package dependencies for you, or when your team already standardises on conda environments. The Anaconda walkthrough starts below.
How to Install RStudio in Anaconda
Anaconda bundles R, RStudio and the conda package manager, so a single installer covers the whole toolchain. The diagram below shows how those pieces fit together.
How to Install RStudio in Anaconda for Mac
Below are the steps to install RStudio in Anaconda for Mac:
Step 1) Download Anaconda for your operating system.
Go to the Anaconda Distribution download page and download the installer.
By default, Chrome selects the download for the system you are browsing from. This walkthrough installs Anaconda on macOS; on Windows or Linux, pick the Windows or Linux installer on the same page. The screenshots below were captured on an older release that shipped Python 3.6, so the version numbers on your download page will be higher โ the steps themselves are unchanged.
Step 2) Start the Anaconda installation.
You are now ready to install Anaconda. Double-click the downloaded file to begin. The file is a .dmg on macOS and an .exe on Windows. You will be asked to confirm the installation. Click the Continue button.
You are redirected to the Anaconda3 Installer.
Step 3) Continue with the installation process.
The next window displays the ReadMe. After you have read the document, click Continue.
Step 4) Read the End User Agreement.
This window shows the Anaconda End User License Agreement. Click Continue to move on.
Step 5) Click the Agree button.
You are prompted to agree. Click Agree to go to the next step.
Step 6) Locate the installation path.
Click Change Install Location to set the location of Anaconda. By default, Anaconda is installed in the user environment: Users/YOURNAME/.
Select the destination by clicking Install for me only. That means Anaconda will be accessible only to this user.
Step 7) Start installing Anaconda.
Click Install to proceed. The screenshot below quotes around 2.5 GB of disk space; current Anaconda Distribution releases need considerably more, and the installer always prints the exact figure for the build you downloaded on this screen.
A message box appears. Confirm by typing your password, then hit Install Software.
Installation may take a while, depending on your machine.
Step 8) Install VS Code if you want.
Anaconda asks whether you want to install Microsoft VS Code. You can ignore it and hit Continue.
Step 9) Finish the installation.
The installation is complete. You can close the window.
You are asked whether you want to move the “Anaconda3” installer to the Trash. Click Move to Trash.
You are done with the installation of Anaconda on a macOS system. The Windows sequence follows the same nine ideas through a different wizard.
How to Install RStudio in Anaconda for Windows
Here are the steps to install RStudio in Anaconda for Windows:
Step 1) Open the downloaded exe and click Next.
Step 2) Accept the License Agreement.
Step 3) Select Just Me and click Next.
Step 4) Select the Destination Folder and click Next.
Step 5) Click Install on the next screen.
Step 6) Installation will begin.
Once it is done, Anaconda is installed. Anaconda ships conda, not R itself, so R is the next thing to add.
How to Install R
Install R on Mac
Here is a step by step process to install R on Mac:
Step 1) Confirm where Anaconda was installed.
Anaconda uses the terminal to install libraries, and the terminal is the quickest way to do it. We need to point the installation at the right path. In our case, Anaconda was installed under Users/USERNAME/, which we can confirm by checking the anaconda3 folder.
Open Computer and select Users, then USERNAME, then anaconda3. That confirms Anaconda landed on the right path. To see how macOS writes the path, right-click the folder and choose Get Info.
Select the path shown under Where and click Copy.
Step 2) Open the terminal.
The shortest way is to use Spotlight Search and type terminal.
The terminal sets the default working directory to Users/USERNAME. As the figure above shows, the path of anaconda3 and the working directory are identical. In macOS, the current folder is shown before the $ prompt. The terminal will install all the libraries in this working directory.
If the path you copied does not match the working directory, change it by writing cd PATH in the terminal, where PATH is the path you pasted into the text editor. Wrap PATH in quotation marks if it contains spaces. This changes the working directory to PATH.
Step 3) Install R.
We are ready to install R. Installing all packages and dependencies with the conda command in the terminal is the simplest route.
## In the terminal conda install r-essentials --yes
r-essentials means conda will install R together with the libraries a data scientist normally needs. The bundle carries roughly two hundred popular packages, including IRkernel, dplyr, shiny, ggplot2, tidyr, caret and nnet.
Conda begins downloading the libraries.
It takes some time to fetch all of them, so be patient.
In the terminal, you should see Executing transaction: done. If so, R is installed.
You can then check where R is located.
Tip: Anaconda now documents installing R into its own environment rather than the base environment, which keeps an R upgrade from disturbing your Python packages:
# Create an isolated conda environment for R conda create --name r_env r-essentials r-base # Switch into it before installing anything else conda activate r_env
Install R on Windows
Following is a step by step process to install R on Windows:
Step 1) Open the Anaconda command prompt.
Step 2) In the command prompt:
- Enter the R install command
- The environment is resolved
- The list of packages to be installed is displayed
Step 3) Enter y and hit the return key to start the installation.
Step 4) Installation takes a while, and finishes with a done message.
How to Install RStudio
With R in place, RStudio can be added from the same conda environment.
Mac User
In the terminal, write the following code to install RStudio through Anaconda:
## In the terminal conda install -c r rstudio --yes
In the terminal, you should see Executing transaction: done. If so, RStudio is installed.
You are all set. Note that -c r selects the deprecated Anaconda R channel; substitute -c conda-forge, or install RStudio Desktop from Posit, if you want a current build.
Windows User
Step 1) Enter the command to install RStudio at the Anaconda prompt.
Step 2) You are shown a list of packages that will be installed. Enter y.
Step 3) RStudio is installed.
Warning: Avoid installing R or RStudio libraries with pip for Python inside a conda environment. Conda packages already gather a lot of dependencies, and mixing the two package managers in one environment is the most common cause of broken R installations under Anaconda.
Run RStudio
Run the command line directly from the terminal to open RStudio: open the terminal and write rstudio. You can also launch it from a desktop shortcut.
Alternatively, start RStudio from the Anaconda Navigator shortcut shown below.
A new window opens with RStudio.
Test the RStudio Installation
Open RStudio from the terminal and open a script. Write the following command:
## In RStudio
summary(cars)
- Click Run
- Check the output in the Console
If you can see the summary statistics, it works. You can close RStudio without saving the files.
Install an R Package with Conda
Installing a package with Anaconda is straightforward. Go to your browser and type the name of the library followed by anaconda r.
Choose the link that points to anaconda.org, then copy the install command shown on the package page and paste it into the terminal.
For instance, to install randomForest for the tutorial on random forest, go to the r-randomforest package page.
Run conda install -c r r-randomforest –yes from the terminal. Conda package names for R libraries carry an r- prefix, which is why the CRAN package randomForest becomes r-randomforest here.
The installation is complete.
Throughout this tutorial you will not need to install many libraries, because the most used ones already come with the r-essentials conda bundle. It includes ggplot2 for graphs and caret for the machine learning project.
Open a Library in RStudio
To run the R function randomForest(), we need to load the library that contains the function. In the RStudio script, we write library(randomForest).
## In Rstudio library(randomForest) ## randomForest 4.6-12 ## Type rfNews() to see new features/changes/bug fixes.
The version line printed here comes from the build that was installed when the screenshots were taken, so your console will show whichever randomForest version conda resolved.
Warning: Avoid loading unnecessary packages. Two packages that export the same function name will mask each other, and the one loaded last wins.
Run R Code in RStudio
There are two ways to run code in R.
Method 1) Run code in the Console. Data is stored in the Global Environment, but no history is recorded. The results cannot be reproduced once R is closed, because the code has to be typed again. This method is not recommended when you want to save or repeat your work.
Method 2) Write the code in a script. A script holds as many lines as you want. To run it, select the rows you want to execute and click Run. The output appears in the Console, and the script can be saved and reopened later, so the work is not lost.
Warning: If you place the cursor on the second row (for example, slice_vector[1:5]) and click Run, the Console displays an error, because line 1 was never executed and the object does not exist yet.
Similarly, if you place the cursor on an empty row and click Run, R returns an empty output. Once the setup is confirmed, the next steps are learning the data types and operators the language is built on, branching with if and else, and drawing a first chart with ggplot2 or boxplot().
















































