MGHome page

GWAS course

Course map

0 of 64 steps done

Start with step 0.1Install R

Saved in this browser only.

Step 0.2

Module 0 · Prepare your computer · step 2 of 8

0.2Install RStudio

In short

We install RStudio, a program that makes R easier to use. We find the Console area where we will run commands.

What you do

No R code runs in this step. Download RStudio Desktop for your system from the official Posit page (opens in a new tab) and follow its installation instructions. Open RStudio and find the Console area with a > prompt.

Do this

You should see: RStudio opens and the Console pane shows a > prompt.

Command

No code to run. Open RStudio from your applications menu. Find the Console pane and check that it shows a > prompt. You will run your first course commands at step 0.4.

You need

A working R installation from step 0.1 and the RStudio installer.

What we do

Install RStudio Desktop (opens in a new tab) and open it. R must already be installed (step 0.1). Follow these actions:

  1. Open the download page. Go to "RStudio Desktop". Click the installer link for your operating system. Save the file.
  2. Open the installer. On Windows, accept the default choices and click "Next" until it ends. On macOS, drag the RStudio icon onto the Applications folder icon in the window that opens. On Linux, follow the instructions on the page.
  3. Start RStudio from the Start menu or the Applications folder.

You should see a window with several panes (areas). One pane is called "Console". It shows a > prompt.

Why

The console runs one command at a time. The editor keeps commands in a notebook, so you can read and rerun them later. R holds values, such as loaded data, in memory. These values disappear when R restarts. Files saved on disk remain.

Illustration in preparation

Alt text: RStudio on Windows with the Console tab selected and an empty R prompt.

Illustration in preparation

Alt text: RStudio on macOS with the Console tab selected and an empty R prompt.

Expected result

Show the expected result

RStudio opens and the Console pane shows a > prompt. No calculation is required yet.

If something goes wrong

If something goes wrong

If RStudio cannot find R, check that you installed R for the correct processor. Restart RStudio after you install R. If the prompt shows + instead of >, press Escape to return to an empty prompt.

Quick check

After restarting R, should you expect an unsaved object to remain in memory?

Show the answer

No. Reload it from a saved file or rerun the command that creates it.

Files created

RStudio software files. No course data are created.