MGHome page

GWAS course

Course map

0 of 64 steps done

Start with step 0.1Install R

Saved in this browser only.

Step 0.5

Module 0 · Prepare your computer · step 5 of 8

0.5Install the R packages

In short

We install the R packages, which add functions needed by the course. These prepare R to ask for a hidden password and check the downloaded files.

Do this

You should see: The > prompt returns.

Command

R command

Type or paste into the RStudio console.

1source("R/package_setup.R")2install_course_packages()3source("R/course.R")
  1. Note 1: Load the helper that prepares the course packages.
  2. Note 2: Install any required packages that are missing.
  3. Note 3: Load the course functions into R.

You need

A working project from step 0.4 and an internet connection.

What we do

Install the R packages used by the course. A package is an add-on that gives R more functions. Keep the project from step 0.4 open.

Why

The course needs archive, digest, getPass, knitr and rmarkdown. Installing them now prepares the masked password prompt and the data checks.

Expected result

Show the expected result

The > prompt returns. If packages were installed, R also prints Course packages are ready. Already installed packages need no download.

If something goes wrong

If something goes wrong

Stop at the first error. Check your internet connection. On Linux, the helper chooses matching ready-made Posit packages where they exist. If source installation is needed, it explains which development libraries you need. Ask the instructor or your institution's support team for help.

Quick check

Do these R packages replace the PLINK executable?

Show the answer

No. Put PLINK 2 in bin/ at step 0.6.

Files created

R package files in your R library. No course data are created.