Environment, Dependencies, and Data Foundations
Get everyone set up with a working R environment and understand how the pieces fit together.
Then: hands-on practice in the notebook.
Your Code
↓
R Packages (dplyr, ggplot2, HADES...)
↓
R (the interpreter)
↓
System Dependencies (Java, compilers...)
↓
Operating System (Windows, macOS, Linux)
When R starts, it creates a session with:
Everything you create is an object. Even functions are objects.
Assignments inside a function stay local. Functions don’t modify objects in place—you must capture return values.
This isolation is why R is safe for exploratory analysis.
A package bundles functions, documentation, and data.
| Source | Examples | Install command |
|---|---|---|
| CRAN | dplyr, ggplot2 | install.packages() |
| Bioconductor | DESeq2 | BiocManager::install() |
| GitHub | OHDSI/HADES | remotes::install_github() |
Installing = download to disk (once)
Loading = make available in session (library() each time)
Open the notebook and let’s work through it together.
modules/01_r-workflow/r-foundations.qmd