Summary and Setup
Prerequisites
- Knowledge of R programming (eg, a data carpentries course)
- Knowledge of basic statistical techniques (eg, an introduction to linear regression for health sciences)
Extra resources
This course can’t cover all aspects of statistics and data with R. There are many free resources to learn more about the topics, and indeed to learn even broader topics! Some of these are listed here:
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 from the posit documentation. 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 https://r.igraph.org/,
All learners should then run the following code to download the data and install the libraries used in this lesson:
R
install.packages("renv")
download.file(
"https://raw.githubusercontent.com/carpentries-incubator/high-dimensional-stats-r/refs/heads/transition-workbench/renv.lock",
destfile = 'renv.lock'
)
renv::restore()
dir.create("data", recursive=TRUE, showWarnings = FALSE)
data_files <- c(
"cancer_expression.rds",
"coefHorvath.rds",
"methylation.rds",
"scrnaseq.rds",
"prostate.rds",
"cres.rds"
)
for (file in data_files) {
download.file(
url = file.path(
"https://raw.githubusercontent.com/carpentries-incubator/high-dimensional-stats-r/main/episodes/data",
file
),
destfile = file.path("data", file)
)
}