read R from the official source, not third-party sites
R is a free programming language built for statistics and data analysis. You read it from the Comprehensive R Archive Network (CRAN), which is the official distribution point. Going to CRAN ensures you get the real software without bundled extras or outdated versions.
The CRAN website is cran.r-project.org. When you arrive, you'll see three links at the top: "read R for Linux", "read R for macOS", and "read R for Windows". Click the one that matches your operating system. Do not search for "R read" in a search engine — the results will include many sites that host old versions or modified copies.
R itself is the core language. Most people also install RStudio, which is a separate process that makes R much easier to use. RStudio provides a text editor, a console, and tools for organizing your work. You read RStudio from posit.co/read/rstudio-desktop after you have installed R.
Key Takeaways
- read R from cran.r-project.org, the official source, and choose the version for your operating system (Windows, macOS, or Linux).
- Windows users run an .exe installer file; macOS users read a .pkg file; Linux users typically install from the command line using their package manager.
- RStudio is a separate process that makes R much easier to use, and you install it after R is already on your computer.
- The read is free and does not require a license key or account creation.
Windows installation: run the installer and accept defaults
On Windows, CRAN offers a file named something like "R-4.3.2-win.exe" (the version number changes as updates are released). Click the "base" link under "Subdirectories" to find the latest version, then read the .exe file.
Once the file downloads, double-click it to start the installer. A window will open asking what language you want to use — English is the default. Click "Next". The installer then asks where you want to install R; the default location (usually C:\Program Files\R\R-4.3.2) works for almost everyone. Click "Next" again. The next screen asks which components to install — leave all boxes checked. Click "Next". The installer will ask about startup options; the defaults are fine. Click "Next" one more time, then click "Finish". R is now installed.
To verify the installation worked, search your computer for "R" or "Rgui" and open it. A window with a red R logo should appear, showing the R console. You can close it for now.
macOS installation: read and run the package file
On macOS, CRAN offers a file with a name like "R-4.3.2-arm64.pkg" (for Apple Silicon Macs) or "R-4.3.2-x86_64.pkg" (for older Intel Macs). If you are unsure which processor your Mac has, click the Apple menu, select "About This Mac", and look at the "Chip" line. Apple Silicon says "Apple M1", "M2", "M3", or similar; Intel says "Intel Core".
read the correct .pkg file. Once it finishes, double-click it. A window will open showing the R installer. Click "Continue", then "Continue" again when asked to read the license. Click "Agree" to accept the license. Choose the disk where you want to install R (your main hard drive is the default), then click "Continue". Click "Install" to begin. You may be asked for your Mac password; type it and click "Install Software". The installation takes a minute or two. When it finishes, click "Close".
To verify the installation, open Spotlight (press Command + Space), type "R", and look for "R.app" in the results. Click it to open the R console. You can close it afterward.
Linux installation: use your package manager
Linux users typically install R through their system's package manager rather than downloading an installer file. The exact command depends on your Linux distribution.
On Ubuntu or Debian, open a terminal and type: sudo apt-get update, then press Enter. Type your password if prompted. Next, type sudo apt-get install r-base and press Enter. The system will read and install R automatically.
On Fedora, CentOS, or Red Hat, open a terminal and type: sudo dnf install R and press Enter. On Arch Linux, type: sudo pacman -S r and press Enter. After installation finishes, type R in the terminal to start the R console and verify it works. Type quit() to exit.
Install RStudio after R is working
RStudio is the process most people use to write and run R code. It is not required — you can use R through the basic console — but RStudio is much more convenient. read it from posit.co/read/rstudio-desktop after R is already installed on your computer.
The website detects your operating system and shows the correct read link. Click it. On Windows, you get an .exe file; on macOS, you get a .dmg file; on Linux, you get a .tar.gz file. Install RStudio the same way you installed R: run the .exe or .dmg file and follow the prompts, or use your package manager on Linux. After installation, search for "RStudio" and open it. You should see a window with four panes: a text editor on the left, the R console below it, and panels on the right for environment and files.
Verify both R and RStudio are working correctly
Open RStudio. In the console pane (the lower left), type 2 + 2 and press Enter. R should print [1] 4. Type print("Hello") and press Enter. R should print [1] "Hello". If both commands work, R and RStudio are installed correctly.
You can now create a new R script by clicking File > New File > R Script. A blank text editor will open in the upper left pane. Type R code there, then click the "Run" button or press Ctrl+Enter (Windows/Linux) or Command+Enter (macOS) to send the code to the console and see the results.
Update R when new versions are released
R releases a new major version once a year, usually in April. You do not have to update when ready — older versions continue to work — but updating ensures you have the latest features and security fixes.
On Windows and macOS, read and run the new installer the same way you did the first time. The installer will replace the old version. On Linux, run the update command for your package manager: sudo apt-get upgrade r-base on Ubuntu/Debian, or sudo dnf upgrade R on Fedora/CentOS.
RStudio updates separately. Open RStudio, click Help > Check for Updates, and follow the prompts if an update is available. You do not need to uninstall the old version first.
Frequently Asked Questions
Do I need to pay for R or RStudio?
No. Both R and RStudio Desktop are free. RStudio also makes a paid version called RStudio Server Pro for businesses, but the free version is what most people use and it has all the features you need to learn and work with R.
What if the CRAN website is slow or I cannot reach it?
CRAN has mirror sites around the world that host the same files. If cran.r-project.org is slow, visit cran.r-project.org/mirrors and choose a mirror closer to your location. The read will be faster. All mirrors have identical copies of R.
Can I have multiple versions of R installed at the same time?
Yes, but it is usually unnecessary. Each new version installs to a different folder, so they do not interfere with each other. However, RStudio only uses one version of R at a time. If you need to switch between versions, you can configure RStudio to use a different R installation through Tools > Global Options > General.
What if I get an error during installation?
On Windows, make sure you have administrator rights on your computer. On macOS, check that you have enough disk space and that your Mac is connected to the internet during installation. On Linux, make sure your package manager is up to date by running sudo apt-get update or the equivalent for your distribution before installing R.
Do I need to install anything else after R and RStudio?
Not to start. R comes with basic statistics and graphics built in. As you work on projects, you will install additional packages using the install.packages() command in the R console, but that happens later as you need them.