|
1 |
| -# Getting Started {#GetStart} |
2 |
| - |
3 |
| -These instructions cover how to install R in Windows. The tools required to build R and R packages in Windows are also discussed. |
4 |
| - |
5 |
| -## General instructions |
6 |
| - |
7 |
| -1. 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. |
8 |
| - |
9 |
| -2. R uses a ‘major.minor.patchlevel’ version numbering scheme. Accordingly there are three main releases of R available to install: |
10 |
| - |
11 |
| - * The official release (`r-release`), |
12 |
| - |
13 |
| - * The patched release (`r-patched`), and |
14 |
| - |
15 |
| - * The development release (`r-devel`). |
16 |
| - |
17 |
| -The `r-devel` is the next minor or eventually major release development version of R. Mostly, bug fixes are introduced in `r-patched`, while `r-devel` is for introducing new features. |
18 |
| - |
19 |
| -## Installing R {#installR} |
20 |
| - |
21 |
| -1. The binary builds of R for Windows can be downloaded and installed from [here](https://cran.r-project.org/bin/windows/base/). Along with the link to the latest stable release, this page also contains links to the binary builds of r-patched and r-devel. |
22 |
| - |
23 |
| -2. Click on the download links to download an executable installer. |
24 |
| - |
25 |
| -3. 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: `User installation`, `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. |
26 |
| - |
27 |
| -## Building R and R packages |
28 |
| - |
29 |
| -### What tools do you need to build R from source on Windows? |
30 |
| - |
31 |
| -1. [RTools](https://github.com/r-windows/docs/blob/master/faq.md#what-is-rtools) is the toolchain bundle that you can use to build R base and R packages containing compiled code, on Windows. |
32 |
| - |
33 |
| -2. You also need a distribution of LaTeX installed for building R and checking packages. The MiKTeX distribution of LaTeX that is used on CRAN can be downloaded from https://miktex.org. |
34 |
| - |
35 |
| -### How to setup `RTools`? |
36 |
| - |
37 |
| -1. The latest version of `RTools` can 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 PC` in Windows Explorer and check the properties if you are unsure). |
38 |
| - |
39 |
| -2. Don't forget to add `RTools` to the path as documented on the download page. |
40 |
| - |
41 |
| -### How to build R? |
42 |
| - |
43 |
| -To build R for Windows using `RTools` follow the instructions in this [README](https://github.com/r-windows/r-base#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. |
44 |
| - |
45 |
| -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. |
46 |
| - |
47 |
| -However, even for the quick build there are some [default requirements](https://github.com/r-windows/r-base/blob/master/quick-build.sh). 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](https://github.com/r-windows/r-base/blob/50a229fc76c50a5fb42c0daa367466aaf2318171/quick-build.sh#L13) whereas the Windows bit can be customised [here](https://github.com/r-windows/r-base/blob/50a229fc76c50a5fb42c0daa367466aaf2318171/quick-build.sh#L6). |
48 |
| - |
49 |
| -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. |
50 |
| - |
51 |
| -## How to download the R sources directly or from the svn repository? |
52 |
| - |
53 |
| - * To download the R sources on Windows, you can use `tar` from the RStudio terminal. |
54 |
| - |
55 |
| - * 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. |
56 |
| - |
57 |
| -## See also |
58 |
| - |
59 |
| -1. [CRAN official website](https://cran.r-project.org) |
60 |
| - |
61 |
| -2. [R installation and administration manual](https://cran.r-project.org/doc/manuals/r-patched/R-admin.html) |
62 |
| - |
63 |
| -3. [R for Windows FAQ](https://cran.r-project.org/bin/windows/base/rw-FAQ.html) |
64 |
| - |
65 |
| -4. [Rtools40 manual for Windows](https://cran.r-project.org/bin/windows/Rtools/) |
66 |
| - |
67 |
| -5. [R FAQ](https://cran.r-project.org/doc/FAQ/R-FAQ.html) |
| 1 | +# Getting Started {#GetStart} |
| 2 | + |
| 3 | +These instructions cover how to install R in Windows. The tools required to build R and R packages in Windows are also discussed. |
| 4 | + |
| 5 | +## General instructions |
| 6 | + |
| 7 | +1. 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. |
| 8 | + |
| 9 | +2. R uses a ‘major.minor.patchlevel’ version numbering scheme. Accordingly there are three main releases of R available to install: |
| 10 | + |
| 11 | + * The official release (`r-release`), |
| 12 | + |
| 13 | + * The patched release (`r-patched`), and |
| 14 | + |
| 15 | + * The development release (`r-devel`). |
| 16 | + |
| 17 | +The `r-devel` is the next minor or eventually major release development version of R. Mostly, bug fixes are introduced in `r-patched`, while `r-devel` is for introducing new features. |
| 18 | + |
| 19 | +## Installing R {#installR} |
| 20 | + |
| 21 | +1. The binary builds of R for Windows can be downloaded and installed from [here](https://cran.r-project.org/bin/windows/base/). Along with the link to the latest stable release, this page also contains links to the binary builds of r-patched and r-devel. |
| 22 | + |
| 23 | +2. Click on the download links to download an executable installer. |
| 24 | + |
| 25 | +3. 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: `User installation`, `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. |
| 26 | + |
| 27 | +## Building R and R packages |
| 28 | + |
| 29 | +### What tools do you need to build R from source on Windows? |
| 30 | + |
| 31 | +1. [RTools](https://github.com/r-windows/docs/blob/master/faq.md#what-is-rtools) is the toolchain bundle that you can use to build R base and R packages containing compiled code, on Windows. |
| 32 | + |
| 33 | +2. You also need a distribution of LaTeX installed for building R and checking packages. The MiKTeX distribution of LaTeX that is used on CRAN can be downloaded from https://miktex.org. |
| 34 | + |
| 35 | +### How to setup `RTools`? |
| 36 | + |
| 37 | +1. The latest version of `RTools` can 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 PC` in Windows Explorer and check the properties if you are unsure). |
| 38 | + |
| 39 | +2. Don't forget to add `RTools` to the path as documented on the download page. |
| 40 | + |
| 41 | +### How to build R? |
| 42 | + |
| 43 | +To build R for Windows using `RTools` follow the instructions in this [README](https://github.com/r-windows/r-base#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. |
| 44 | + |
| 45 | +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. |
| 46 | + |
| 47 | +However, even for the quick build there are some [default requirements](https://github.com/r-windows/r-base/blob/master/quick-build.sh). 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](https://github.com/r-windows/r-base/blob/50a229fc76c50a5fb42c0daa367466aaf2318171/quick-build.sh#L13) whereas the Windows bit can be customised [here](https://github.com/r-windows/r-base/blob/50a229fc76c50a5fb42c0daa367466aaf2318171/quick-build.sh#L6). |
| 48 | + |
| 49 | +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. |
| 50 | + |
| 51 | +## How to download the R sources directly or from the svn repository? |
| 52 | + |
| 53 | + * To download the R sources on Windows, you can use `tar` from the RStudio terminal. |
| 54 | + |
| 55 | + * 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. |
| 56 | + |
| 57 | +## See also |
| 58 | + |
| 59 | +1. [CRAN official website](https://cran.r-project.org) |
| 60 | + |
| 61 | +2. [R installation and administration manual](https://cran.r-project.org/doc/manuals/r-patched/R-admin.html) |
| 62 | + |
| 63 | +3. [R for Windows FAQ](https://cran.r-project.org/bin/windows/base/rw-FAQ.html) |
| 64 | + |
| 65 | +4. [Rtools40 manual for Windows](https://cran.r-project.org/bin/windows/Rtools/) |
| 66 | + |
| 67 | +5. [R FAQ](https://cran.r-project.org/doc/FAQ/R-FAQ.html) |
0 commit comments