How To Get An R Download For Windows (Both 32 And 64-Bit Systems)

R download for Windows

It should take you much time to get an R download for Windows, even if you aren’t familiar with this language. In this guide, we will show you how to get a full R environment set up on your Windows system.

R Download For Windows

Official Binaries

You can get the official installers from CRAN (Comprehensive R Archive Network). This is where the R project hosts its distributions, binaries, documentation, and contributed packages.

In particular, to get prebuilt binaries for Windows systems, head over to its download page and click on the first download link. This is the base distribution of R.

When the download completes, just run the installer and follow its instructions. You can use the default settings during the installation process.

By default, R will install both 32- and 64-bit versions on your 64-bit computer. They will be located in the same location, sharing the vast majority of files, including your configurations.

Note: after version 4.1.3 (released in March 2022), R has only supported the 64-bit architecture for Windows computers. No 32-bit builds have been provided by recent versions, including 4.2.2 – the newest version as of the time of writing.

You will need an older version of R to use it on your 32-bit Windows system. For example, here is where you can download the installer of R 4.1.3. 

Additionally, you will need an update for Universal C Runtime (CRT) to use R on Windows. Windows 10 comes with this component, so if you have this version, you don’t need to do anything.

For Windows 7 and Windows 8 users, you will need to go to its download page on microsoft.com and grab the installer for your system.

Check The Integrity Of Installers

You can compare the MD5 checksum of your Windows installer and the official value provided by R to make sure it hasn’t been corrupted during the download process.

For example, use this command to print the checksum of the R 4.2.2 installer:

certutil -hashfile R-4.2.2-win.exe MD5

It should print “eaa06020ec663918c580050038f1d1d5”, which is the fingerprint of the original file. For other versions, look for the md5sum*.txt file in the same place you download your R installer.

Build R From Source

We highly recommend using prebuilt binaries since it is the easiest and most convenient way to install R on all platforms, including Windows. You will get a full R installation up and running in no time.

Many may choose to install R from source, however. They may want to build it from the development branch or customize a few compilation options. Learning this also allows you to build packages from sources if their authors don’t provide pre-compiled binaries.

Still, this is a complicated process that only experienced users should perform. Avoid this option when you don’t have any experience in programming or building software.

First, you will need to get a set of additional tools for building R. The most important component is RTools – the official toolchain bundle from R developers. They use this software suite themselves to build R and other packages from source before distributing them to you and other users.

Go to the download page of RTools and select the right version for the R version you want to install. It provides the necessary software for building R, including the GCC compiler, Msys2 build tools, pre-compiled libraries, and headers for almost every CRAN package.

The size of this installer is quite big (around 400MB). RTools may use up to 3GB of your disk space after installation. You should stick with the default setting and install it into the rtools42 directory of your Windows primary partition.

After installing RTools, you will need to get the source code of R to build it. Go to its source page and get the tarball (with the extension .tar.gz) of the latest release.

Extract this compressed file into an empty directory. For example, this command tells tar to extract the source code of R 4.2.2 in the current working directory:

tar -xf R-4.2.2.tar.gz

Let’s say tar has been extracted into the R directory. Switch to src/gnuwin32 and make a copy of R’s configuration rules:

cd R/src/gnuwin32

cp MkRules.dist MkRules.local

Open the MkRules.local file and make the changes you want. When done, run this command to build R:

make all recommended vignettes

The compilation process may take a long time; make sure you don’t interrupt it.

RStudio

In most cases, you will need an IDE (integrated development environment) to make your R programming experience more seamless and user-friendly.

While there are many options on the market, we recommend RStudio from Posit as your R IDE. It is free, open-source, and widely used by the R community.

Go to the download page and get the installer for RStudio Desktop. Run the installer and follow its instructions.

Note: recent versions of RStudio only support 64-bit systems. If you are using a 32-bin Windows machine, you will need an older version. Go to the page for older versions and pick the installer compatible with your operating system.

Microsoft R Open

In addition to the official distribution, you can also use other R distributions. Since this is an open-source project, any party can modify its source code and create a customized distribution.

Microsoft R Open is a third-party distribution like that from Microsoft. This enhanced version adds support for multithreading, which can improve R performance. It is compatible with all scripts and packages that work with R 4.0.2 – the version of R it is based on.

You will need a 64-bit Windows 10 computer to install Microsoft R Open. Go to its download page and get the installer for Windows. Launch the installer with administrator privileges and follow its instructions.

Summary

You can get an R download for Windows from the official download page of the R project. It provides prebuilt binaries for all recently released versions, allowing you to set up an R environment on your system quickly. After installing R, follow our guides to get the basics of this amazing language.

Maybe you are interested:

Posted in R

Leave a Reply

Your email address will not be published. Required fields are marked *