[1] "R version 4.6.0 (2026-04-24)"
Chapter 1: Getting and Installing R
Shih Chien University
2026-08-03
R (R Core Team 2024) is a free, open-source environment for statistical computing and graphics, descended from the S language developed at Bell Laboratories (Becker et al. 1988). Throughout this course, the single name “R” actually bundles several things together:
Our textbook is R in a Nutshell (2nd ed.) (Adler 2012). This first chapter has one practical goal: get a working copy of R onto your machine.
Note
Three reasons R dominates applied data work. It is free of license fees, it runs on every major platform, and it is surrounded by an enormous ecosystem of contributed packages covering nearly every statistical method ever published.
x.y.0 release each spring, followed by patch releases (x.y.1, x.y.2, …) that fix bugs.4.4.2.NA in partially initialized arrays changed back in R 2.5).R-4.4.2-win.exe), so the exact name you see will always be newer than any screenshot or book. Just take the latest one.A binary is a precompiled, ready-to-run build of R — the easiest installation route on every desktop platform. To get one:
A few platform-specific notes follow — Windows and macOS users normally download and run installers themselves, while Linux users are better served by a package manager.
.exe installer.%ProgramFiles%\R (usually C:\Program Files\R\), with a Start-menu entry in the group R.arm64 package.x86_64 package..pkg installer places an application called R in your Applications folder and a command-line R on your path: download, double-click, follow the prompts.On Linux, the cleanest route is the distribution’s package-management system: it fetches R, resolves every other piece of software R needs, and makes later upgrades a one-line affair. Before you start, make sure you know the root password or have sudo privileges; otherwise you will need the system administrator.
sudo apt-get upgrade or sudo dnf update R brings you to the newest packaged version.r-base-dev (or the equivalent) is worth installing too — it provides the compilers needed to build contributed packages from source.If you prefer (or a package manager is unavailable), you can download the files and install manually:
R-2.15.1.fc10.i386.rpm into ~/Downloads, install it with:It is standard practice to build R from source on Linux/Unix — but not on Windows or macOS, where it is tricky and yields little benefit for ordinary users:
The fact that you can build R anywhere is, however, exactly how R reaches unusual platforms — a direct benefit of open source.
For the curious, building on a Unix-like system follows the time-honored ritual:
configure inspects your system and prepares the build; make compiles; make install copies the result into place.Launch R and confirm the console responds:
If you see sensible output, your installation works and you are ready for Chapter 2, where we tour the user interface.
Tip
Keep R current. When a new version appears (CRAN announces them on the front page), upgrading follows exactly the same steps as installing — and on Linux, your package manager does it for you.
Copyright. These slides are adapted from R in a Nutshell: A Desktop Quick Reference (2nd ed.) by Joseph Adler, O’Reilly Media. All rights reserved by the original author and publisher.
Non-commercial use only. These materials are strictly for educational purposes and may not be used for commercial gain.
Attribution. Any reproduction, distribution, or use of these materials must properly credit the original source.
R in a Nutshell: A Desktop Quick Reference