Install R and RStudio

These are the two pieces everything else sits on: R (the engine that does the statistics) and RStudio (the friendlier window you drive it from). Both are free. Install R first, then RStudio on top of it.

You only do this once per computer. If you need to set up a second machine later, this page is the one to come back to.

Install R

Go to CRAN — the official archive of R, at https://cran.r-project.org — choose the download for your system (Windows, Mac, or Linux), and run the installer with its default settings. That’s it; you won’t open R directly — RStudio will.

On a Mac, one extra choice matters. The Mac download page offers two installers — one for Apple silicon Macs (the newer M1/M2/M3/M4 chips) and one for older Intel Macs — and you want the one that matches your computer. To check which you have, open the Apple menu (top-left of the screen) and choose About This Mac: a line reading Chip: Apple M… means Apple silicon, while Processor: …Intel… means Intel. Pick the matching installer — its filename ends in arm64 for Apple silicon and x86_64 for Intel. A newer Mac will run the Intel version through Apple’s built-in translation, so grabbing the wrong one isn’t a disaster — but the matching build runs faster and avoids a class of confusing errors that can show up later when you install packages. (Windows has a single installer, so there’s no equivalent choice to make there.)

Install RStudio

Download RStudio Desktop from https://posit.co/download/rstudio-desktop/ and install it. (Install R first; RStudio needs it.) From now on, RStudio is the program you open to work.

The download page also mentions paid products — those are enterprise tools aimed at large organizations, not something you’re missing out on. The free RStudio Desktop is the full program, and it’s the one you’ll open every time you work.

RStudio’s own getting-started guide

You may come across RStudio’s own Get Started guide while poking around. It’s well made, but it’s built around a different set of tools — the tidyverse family of packages (especially ggplot2 for graphs) — rather than jstats, so the commands it teaches aren’t the ones these guides use. It also describes the RStudio window as showing four panes the moment you open it; in practice you’ll see three at first, with the fourth (the top-left editor) appearing once you open a script or view a dataset — which is how the next page describes it, to match what you’ll actually see.

It overlaps a good deal with our own orientation but follows a different path, so for the jstats route the simplest thing is to skip it and keep going here. The next page is that orientation — a quick tour of RStudio (the panes, the console, and how your data looks once it’s loaded) — before you add the jstats package itself.