3  Installing R under Windows – R Manuals :: R Installation and Administration (2024)

[The rest of this paragraph is only relevant after release.] The bin/windows directory of a CRAN site contains binaries for a base distribution and a large number of add-on packages from CRAN to run on 64-bit x86_64 Windows.

R is most tested on current versions of Windows 10 and Windows Server 2022 with UTF-8 as the charset encoding. It works also on Windows 11. It runs on older versions of Windows, but normally with other charset encoding and may require manual installation of the Universal C Runtime (UCRT).

Your file system must allow long file names (as is likely except perhaps for some network-mounted systems). If it does not also support conversion to short name equivalents (a.k.a. DOS 8.3 names), then R must be installed in a path that does not contain spaces.

Installation is via the installer R-4.4.1-win.exe. Just double-click on the icon and follow the instructions. You can uninstall R from the Control Panel.

You will be asked to choose a language for installation: that choice applies to both installation and un-installation but not to running R itself.

See the R Windows FAQ for more details on the binary installer and for information on use on older Windows systems.

3.1 Building from source

It is possible to use other 64-bit toolchains (including ‘MSYS2’) with UCRT support to build R, but this manual only documents that used for recent binary distributions of R. When using other toolchains, makefiles of R and packages may need to be adapted.

3.1.1 The Windows toolset

The binary distribution of R is currently built with tools from Rtools44 for Windows. See Building R and packages for more details on how to use it.

The toolset includes compilers (currently GCC version 13.2.0 with selected additional patches) and runtime libraries from the ‘MinGW-w64’ project and a number of pre-compiled static libraries and headers used by R and R packages, compiled by ‘MXE’ (M cross environment, with updates maintained by Tomas Kalibera). The toolset also includes build tools from the the ‘MSYS2’ project. Additional build tools packaged by ‘MSYS2’ may be installed via a package manager (pacman).

There is also an experimental variant of Rtools44 with support for 64-bit ARM CPUs (aarch64) via LLVM 17 toolchain using clang/flang-new compilers, lld linker, and libc++.

The toolsets used for 64-bit Windows from 2008 to 2022 were based on MinGW-w64. The assistance of Yu Gong at a crucial step in porting R to MinGW-w64 is gratefully acknowledged, as well as help from Kai Tietz, the lead developer of the MinGW-w64 project and from Martin Storsjo.

3.1.2 LaTeX

Both building R and checking packages need a distribution of LaTeX installed, with the directory containing pdflatex on the path.

The MiKTeX (https://miktex.org/) distribution of LaTeX is that used on CRAN. This can be set up to install extra packages ‘on the fly’ (without asking), which is the simplest way to use it. The ‘basic’ version of MiKTeX will need to add some packages.1 In any case ensure that the inconsolata package is installed—you can check with the MiKTeX Package Manager.

1There are reports of segfaults when MiKTeX installs additional packages when making NEWS.pdf: re-running make seems to solve this.

It is also possible to use the TeX Live distribution from https://www.tug.org/texlive/. (The CRAN package tinytex can install and manage a subset of TeX Live.)

3.2 Checking the build

You can test a build by running

make check

The recommended packages can be checked by

make check-recommended

Other levels of checking are

make check-devel

for a more thorough check of the R functionality, and

make check-all

for both check-devel and check-recommended.

If a test fails, there will almost always be a .Rout.fail file in the directory being checked (often tests/Examples or tests): examine the file to help pinpoint the problem.

Parallel checking of package sources (part of make check-devel and make check-recommended) is possible: see the environment variable TEST_MC_CORES to the maximum number of processes to be run in parallel.

3.3 Testing an Installation

The Windows installer contains a set of test files used when building R.

The toolset is not needed to run these tests, but more comprehensive analysis of errors will be given if diff is in the path.

Launch either Rgui or Rterm (preferred), preferably with --vanilla. Then run

Sys.setenv(LC_COLLATE = "C", LC_TIME="C", LANGUAGE = "en")tools::testInstalledBasic("both")tools::testInstalledPackages(scope = "base")tools::testInstalledPackages(scope = "recommended")

runs the basic tests and then all the tests on the standard and recommended packages. These tests can be run from anywhere: testInstalledBasic writes results in the tests folder of the R home directory (as given by R.home()) and testInstalledPackages under the current directory unless a different one is specified by outDir.

For the tests folder to be writeable, one normally needs to install R to a directory other than the default C:\Program Files. The installer also allows to install R without Administrator privileges, see the R Windows FAQ for more details.

The results of example(md5sums) when testing tools may differ from the reference output as some files are installed with Windows’ CRLF line endings. Also, expect differences in reg-plot-latin1.pdf.

One can also run tests from the toolset shell (e.g.bash) similarly to a Unix-like installation. Move to the home directory of the R installation (as given by R RHOME or from R as R.home()) and run

cd tests## followed by one of../bin/R CMD make check../bin/R CMD make check-devel../bin/R CMD make check-all

Remember that LaTeX needs to be on the path.

Footnotes

3  Installing R under Windows – R Manuals :: R Installation and Administration (2024)
Top Articles
Easy 3-Bean Chili Recipe {Vegan} | Haute & Healthy Living
15 Healthy Clean Eating Sweet Snack Recipes | Aglow Lifestyle
Craigslist Livingston Montana
Fiskars X27 Kloofbijl - 92 cm | bol
Star Wars Mongol Heleer
Duralast Gold Cv Axle
Exclusive: Baby Alien Fan Bus Leaked - Get the Inside Scoop! - Nick Lachey
Inducement Small Bribe
Poe Pohx Profile
Lima Crime Stoppers
Connexus Outage Map
8 Ways to Make a Friend Feel Special on Valentine's Day
Chicken Coop Havelock Nc
Funny Marco Birth Chart
finaint.com
Craiglist Galveston
Google Feud Unblocked 6969
Illinois Gun Shows 2022
Craigslist Panama City Fl
Directions To Advance Auto
Grandview Outlet Westwood Ky
Transactions (zipForm Edition) | Lone Wolf | Real Estate Forms Software
Canvasdiscount Black Friday Deals
Doki The Banker
Hannaford To-Go: Grocery Curbside Pickup
Anotherdeadfairy
Yugen Manga Jinx Cap 19
Jeff Nippard Push Pull Program Pdf
Trivago Myrtle Beach Hotels
Pokémon Unbound Starters
Darknet Opsec Bible 2022
Junior / medior handhaver openbare ruimte (BOA) - Gemeente Leiden
Is Arnold Swansinger Married
Gary Lezak Annual Salary
Easy Pigs in a Blanket Recipe - Emmandi's Kitchen
Husker Football
Panorama Charter Portal
All Obituaries | Sneath Strilchuk Funeral Services | Funeral Home Roblin Dauphin Ste Rose McCreary MB
412Doctors
Pgecom
Ups Authorized Shipping Provider Price Photos
Haunted Mansion (2023) | Rotten Tomatoes
Boyfriends Extra Chapter 6
Lesson 5 Homework 4.5 Answer Key
Slug Menace Rs3
Rubmaps H
Immobiliare di Felice| Appartamento | Appartamento in vendita Porto San
Epower Raley's
O'reilly's Eastman Georgia
Jesus Calling Oct 6
Craigslist Charlestown Indiana
Coors Field Seats In The Shade
Latest Posts
Article information

Author: Chrissy Homenick

Last Updated:

Views: 5762

Rating: 4.3 / 5 (74 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Chrissy Homenick

Birthday: 2001-10-22

Address: 611 Kuhn Oval, Feltonbury, NY 02783-3818

Phone: +96619177651654

Job: Mining Representative

Hobby: amateur radio, Sculling, Knife making, Gardening, Watching movies, Gunsmithing, Video gaming

Introduction: My name is Chrissy Homenick, I am a tender, funny, determined, tender, glorious, fancy, enthusiastic person who loves writing and wants to share my knowledge and understanding with you.