Stepping Stone IDIBAPS R ggplot2 Data Vizualization workshop 2025
1
Welcome
2
Setup
2.1
Install R and RStudio/Posit
2.2
Install R packages
2.3
Check setup
3
R
3.1
What is R ?
3.2
Functions & packages
3.2.1
Functions
3.2.2
Packages
4
What is RStudio (Posit)?
4.1
RStudio interface
4.2
The R console
5
Paths and directories
5.1
Path and home directory
5.2
RStudio “Projects”
5.2.1
Advantages
5.2.2
Project for the course
5.2.3
Leave the project
5.2.4
Re-open the project
6
R basics
6.1
Arithmetic operators
6.2
Objects in R
6.3
Assigning data to an object
6.4
Data types
7
Import data / read files / scripts
7.1
Fetch workshop files
7.2
Import / read in data
7.2.1
Load package into environment
7.2.2
from CSV
7.2.3
from Excel
7.3
Scripts
8
ggplot2
8.1
Getting started
8.2
Scatter plot
8.2.1
Base plot
8.2.2
Customize the points
8.2.3
Add more layers
8.3
Save your plot
8.3.1
From the RStudio interface
8.3.2
From the console
8.4
Exercise 1
8.5
Scatter plots: more features
8.5.1
Labels
8.5.2
Color and shape mapping
8.5.3
Additional ticks
8.5.4
Density estimates
8.5.5
Regression line
8.6
Barplots
8.7
Exercise 2
8.8
Exercise 2B - review scatter plots before the second day
8.9
Barplots: bars position
8.9.1
stat=“identity” parameter
8.10
Boxplots
8.11
Text fine-tuning
8.12
Colors
8.12.1
All R colors
8.12.2
Base R palettes
8.12.3
RColorBrewer
8.12.4
ggsci
8.13
Faceting
8.14
Exercise 3
9
Data filtering and wrangling
9.1
filter()
9.2
select()
9.3
rename()
9.4
Exercise 4
10
More ggplots
10.1
Histograms and density plots
10.1.1
Histogram
10.1.2
Density plot
10.1.3
Histogram + density
10.2
Pie chart
10.3
Marginal plots
11
Exercises to do at home
11.1
Exercise 5: barplot
11.2
Exercise 6: scatter plot
11.3
Exercise 7: boxplot
12
Interactive plots with {plotly}
13
More advanced data manipulation
13.1
The pipe operator
13.2
From wide to long format
13.3
Exercise 8
14
Heatmaps with {pheatmap}
15
Demo volcano plot
16
Resources
Published with bookdown
R for beginners: Introduction to data visualization with R and ggplot2: from data to publication-quality figures
Part3
R