This lesson is in the early stages of development (Alpha version)

High dimensional statistics with R: Setup

It’s usually recommended that course instructors provide a virtual environment with software and data available. However this page includes instructions to set up for the lessons. This should take about an hour to run, depending on the speed of your computer, your internet connection, and any packages you have installed already. You’ll need to install R 4.0 or later.

R usually enables package downloads using pre-built binaries. Some times, this is not possible, particularly on Linux and Mac systems. In this case, R package installation often requires additional system dependencies. If you are a Linux user, to ensure that you can download packages using the code below, first run the terminal commands for your distribution here. Note that you will need to use root access (sudo) to install the system dependencies. Mac users may need to use homebrew to install system dependencies, and Windows users may need to install RTools. Ideally, installing packages will proceed without error and you can ignore these steps, but this isn’t always the case.

Previous learners have reported issues with igraph. Installation instructions for this package can be found on,

All learners should then run the following code to download the data and install the libraries used in this lesson:

    destfile = 'dependencies.csv'
table <- read.table('dependencies.csv')

dir.create("data", showWarnings = FALSE)
data_files <- c(
for (file in data_files) {
        url = file.path(
        destfile = file.path("data", file)