MGHome page

GWAS course

Course map

0 of 64 steps done

Saved in this browser only.

Step 0.1

Module 0 · Prepare your computer · step 1 of 8

0.1Install R

In short

We install R, the program that runs the course commands. We choose the version that matches the computer's system and processor.

What you do

No R code runs in this step. Check your system and processor in the computer's settings. Open CRAN (opens in a new tab), choose your system and follow its installation instructions. On macOS, choose arm64 for Apple Silicon or x86_64 for Intel. Open R and check that its window appears.

Do this

You should see: The R application opens.

Command

No code to run. Open R from the Start menu or the Applications folder. Check that its window opens. Step 0.4 checks the installed version after you open the course project.

You need

A Windows, macOS or Linux computer. You need an internet connection to download the software and the approved data. You also need a folder where you can save files. The local data test does not need a network download. Keep free space for three things: the encrypted archive (opens in a new tab) (a locked data file that needs a password), an extracted copy of it, and your results. The space you need grows as you work.

On a Mac with Apple Silicon, use the ARM64 build. On an Intel Mac, use the Intel build.

What we do

Find your system and processor, then install R.

You can see this without R. On Windows, open Settings, then System, then About, and read "System type". On a Mac, click the Apple menu, then About This Mac. A line "Chip" with a name such as Apple M1 means Apple Silicon. A line "Processor" means an Intel Mac. On Linux, open Settings and look for About or System information. Menu names depend on your distribution.

Install R from CRAN (opens in a new tab), the official website for R. Follow these actions:

  1. Open the CRAN page. Click the link for your system: "Download R for Windows", "Download R for macOS" or "Download R for Linux".
  2. On Windows, click "base" (or "install R for the first time"). Then click the link at the top that starts with "Download R" and ends with "for Windows".
  3. On macOS, click the .pkg file for your processor. Use the arm64 file for Apple Silicon. Use the x86_64 file for an Intel Mac. File names on the page can change a little.
  4. On Linux, follow the CRAN instructions for your distribution. Installing packages may need an administrator.
  5. Open the downloaded file. Accept the default choices. Click "Next" on Windows or "Continue" on macOS until the installer ends. If the computer asks for permission or a password, give it.

After the installation you should see a new program called R. On Windows it is in the Start menu. On macOS it is in the Applications folder.

Why

R reads the commands in the notebooks and runs them. An R package (opens in a new tab) is an add-on that gives R more functions. Packages do not replace R itself.

Illustration in preparation

Alt text: CRAN page showing the Windows R download link.

Illustration in preparation

Alt text: CRAN page showing the Apple Silicon and Intel R installer choices.

Expected result

Show the expected result

The R application opens. Its window shows version information and a > prompt. Your version may differ from the Windows validation environment, which used R 4.5.2. The author also tested Ubuntu extraction with R 4.6.1.

If something goes wrong

If something goes wrong

If you cannot find the system information, ask the instructor or your institution's support team. You do not need R for this step.

If your computer blocks the installation, ask the instructor or your institution's support team for an approved installation. Do not change your system language.

Quick check

Does the R installer also install RStudio?

Show the answer

No. Install RStudio separately at step 0.3.

Files created

The R installer creates software files outside this course project.