Chapter 2 Getting Started
These instructions cover how to install R in Windows. The tools required to build R and R packages in Windows are also discussed.
2.1 General instructions
If you install the latest version or R-patched or R-devel, it will not over-write the previous installation(s) in your Windows machine.
R uses a ‘major.minor.patchlevel’ version numbering scheme. Accordingly there are three main releases of R available to install:
The official release (
The patched release (
The development release (
r-devel is the next minor or eventually major release development version of R. Mostly, bug fixes are introduced in
r-devel is for introducing new features.
2.2 Installing R
The binary builds of R for Windows can be downloaded and installed from here. Along with the link to the latest stable release, this page also contains links to the binary builds of r-patched and r-devel.
Click on the download links to download an executable installer.
Select the language while installing, read the public license information, and select the destination location to start the installation. You will be prompted to select components at this stage:
32-bit User installation,
64-bit User installation, or
Custom installation. The default option may be chosen for the questions from this step onwards to complete the installation.
2.3 Building R and R packages
2.3.1 What tools do you need to build R from source on Windows?
2.3.2 How to setup
The latest version of
RToolscan be downloaded from https://cran.r-project.org/bin/windows/Rtools/ and run in the Windows-style installer. You will need to know if you have a 32-bit or 64-bit Windows machine (right-click
This PCin Windows Explorer and check the properties if you are unsure).
Don’t forget to add
RToolsto the path as documented on the download page.
2.3.3 How to build R?
To build R for Windows using
RTools follow the instructions in this README file. There are two options available to build R. One is the quick development build and the other option is the full installer build.
For development and testing, you need only the quick development build. The quick build avoids building the manuals, which are generally not needed for development and testing.
However, even for the quick build there are some default requirements. For instance, MikTeX is to be installed in
C:/Program Files and you have 64-bit R. If necessary, these defaults can be customised. The installation path of MikTex can be customised here whereas the Windows bit can be customised here.
If you are a maintainer of the Windows CRAN releases then, the full installer build is available for building the complete installer as it appears on CRAN. It will build both the 32-bit and 64-bit R, the pdf manuals, and the installer program. You will use this to create the binary builds and not when building R from the source yourself.
2.4 How to download the R sources directly or from the svn repository?
To download the R sources on Windows, you can use
tarfrom the RStudio terminal.
If you want to checkout the sources from svn, it is probably best to install an SVN client. Either TortoiseSVN (https://tortoisesvn.net/, command line tool, and Windows Explorer integration) or SlikSVN (https://sliksvn.com/download/, just the command line tool) is recommended. They have simple Windows installers and you can use svn straight-away from Windows cmd or RStudio terminal.