Written and maintained by CASRAI Editorial Board
Last updated
Short answer: install R first from CRAN (the Comprehensive R Archive Network), then install RStudio Desktop from Posit if you want an IDE. RStudio does not include R. On Windows you run R-4.6.2-win.exe; on a Mac you choose the Apple silicon (arm64) or Intel (x86_64) package; on Ubuntu you add the CRAN apt repository and install r-base. Versions and requirements below were read from the official CRAN and Posit pages on 2026-11-07.
What R and RStudio are used for in research
R is a language and environment for statistical computing and graphics; RStudio Desktop is a separate program from Posit that gives R a console, script editor and plot pane. You can run R without RStudio (from a terminal or the R console), but you cannot run RStudio without an R installation. For what researchers do with R once it is running, see what R programming is used for and SPSS vs R.
Requirements: which versions run on which systems
The two programs have different operating-system requirements, and the gap matters on older machines. R is installed from CRAN; RStudio Desktop is installed from Posit.
| Platform | R 4.6.2 (CRAN) | RStudio Desktop (Posit docs) |
|---|---|---|
| Windows | 64-bit installer R-4.6.2-win.exe (88 MB). The build requires UCRT, which is part of Windows since Windows 10 and Windows Server 2016. |
Windows 11; installer is an .exe or a .zip. |
| macOS, Apple silicon | R-4.6.2-arm64.pkg (about 100 MB); requires macOS 14 (Sonoma) or later. |
macOS 15 or later; one universal .dmg covers Apple silicon and Intel. |
| macOS, Intel | R-4.6.2-x86_64.pkg (about 103 MB); requires macOS 11 (Big Sur) or later. |
macOS 15 or later (same universal .dmg). |
| Linux | Ubuntu 26.04, 24.04 and 22.04 (amd64 and arm64) via the CRAN apt repository, per the CRAN Ubuntu page dated 21 May 2026. Other distributions have their own pages under CRAN’s bin/linux/. |
x86_64; .deb (Ubuntu 22, 24 and 26; Debian 13), .rpm (RHEL 9 and 10; Fedora), or a tarball for distributions the packages do not cover. |
If your Mac runs macOS 14 or earlier, R itself can still be installed (down to macOS 11 on Intel, 14 on Apple silicon), but the current RStudio Desktop documentation lists macOS 15 or later. In that case use R from the Terminal or the R app, or use a hosted option such as RStudio on the cloud.
Install or access R (official source only)
Download R only from cran.r-project.org (or a CRAN mirror it links to). The pages used here: Windows, macOS, Ubuntu.
Install R on Windows
- Open the CRAN Windows base page and download
R-4.6.2-win.exe. - Optionally check the download against the checksum: the CRAN page says to compare
md5sumoutput with the fingerprint file on the CRAN master site. - Run the installer and accept the defaults unless you have a reason to change them.
Install R on a Mac (Apple silicon or Intel)
- Check your chip: Apple menu, About This Mac. Apple silicon (M-series) needs
R-4.6.2-arm64.pkg; an Intel Mac needsR-4.6.2-x86_64.pkg. - Optionally verify the package. CRAN gives two ways:
pkgutil --check-signature R-4.6.2-arm64.pkg, oropenssl sha1 R-4.6.2-arm64.pkgcompared with the SHA1 published on the macOS page (substitute the file name you downloaded). - Open the
.pkgand follow the installer. - Install XQuartz (CRAN lists version 2.8.5 or later) only if you need X11 or Tcl/Tk features.
Compiling some packages from source can need extra developer tools: CRAN’s macOS page lists a matching GNU Fortran (14.2, from mac.R-project.org/tools) and Xcode (26.0 on arm64, 14.2 on Intel). Most users who install binary packages do not need them. See how to install R packages.
Install R on Ubuntu
The CRAN Ubuntu page (as of 21 May 2026) gives these commands; the repository suffix cran40 marks a binary-compatibility break introduced with R 4.0 and does not mean R 4.0.
sudo apt update -qq
sudo apt install --no-install-recommends software-properties-common dirmngr
wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | sudo tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
sudo add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"
sudo apt install --no-install-recommends r-base
To check the signing key, run gpg --show-keys /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc; CRAN lists the fingerprint as E298A3A825C0D65DFD57CBB651716619E084DAB9. For other distributions follow the matching page under cran.r-project.org/bin/linux/.
Install RStudio Desktop (after R)
Posit’s download documentation (docs.posit.co/ide/user/download.html, read 2026-11-07) states that RStudio needs an existing R installation, which most systems do not come with. This is the answer to “how to download RStudio”: get the installer for your system from Posit’s download page, and install R first.
- Windows: run the
.exeinstaller (a.zipis also offered). - macOS: open the
.dmgand drag the application to Applications. - Linux (RStudio for Linux): install the
.debor.rpmwith your package manager, or use the tarball if your distribution is not covered.
RStudio Server is a separate product for shared servers, with its own supported-platform list; it is not what a personal install needs. For a tour of the interface once installed, see how to use RStudio.
Check the install worked
Open RStudio (or start R in a terminal) and type these into the console:
R.version.string
sessionInfo()
R.version.string prints the version you installed (for example “R version 4.6.2 …”). sessionInfo() shows the platform, operating system and loaded packages. If RStudio opens but reports no R, it cannot find an installation: install R first, then restart RStudio.
Troubleshooting
- RStudio does not start or cannot find R: RStudio does not bundle R (Posit documentation). Install R from CRAN, then restart RStudio.
- Installer refuses to run on an older Mac: compare your macOS version with the table above; R needs macOS 14 on Apple silicon and 11 on Intel, RStudio Desktop needs 15.
- Wrong Mac package: use the
arm64package on Apple silicon and thex86_64package on Intel. - R installs but a package fails to compile: binary packages usually avoid this; for source builds, check the compiler tools CRAN lists for your platform.
- You already have R and want a newer one: see how to update R. To keep project package versions stable across upgrades, see renv.
Ways to run R compared
| Option | What it is | Needs R installed separately? |
|---|---|---|
| R from CRAN (console or terminal) | The R language and environment itself. | It is R. |
| RStudio Desktop | Posit’s IDE installed on your computer. | Yes (Posit documentation). |
| RStudio Server | Separate Posit product for server installation. | Yes; separate platform list in Posit docs. |
| Hosted RStudio | Browser-based use without a local install; see RStudio on the cloud. | No local install. |
For other software that can replace or complement R, see free statistical software.
FAQ
How do I download RStudio?
Install R from CRAN first, then download the RStudio Desktop installer for your operating system from Posit’s download page (docs.posit.co/ide/user/download.html). RStudio does not include R.
Do I install R or RStudio first?
R first. Posit states that RStudio needs an existing R installation, and on Windows nothing else is required.
Which R installer do I need on a Mac?
The arm64 package for Apple silicon, the x86_64 package for Intel Macs. For R 4.6.2 these need macOS 14 and macOS 11 or later respectively.
How do I install R on Linux?
On Ubuntu 22.04, 24.04 or 26.04 use the CRAN apt repository commands above; on other distributions use the matching CRAN bin/linux page.







