• Stepping Stone IDIBAPS Data Vizualization workshop 2024
  • 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 Create the workshop directory
  • 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 from CSV
    • 7.3 from Excel
    • 7.4 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.6 Barplots
    • 8.7 Exercise 2
    • 8.8 Barplots: bars position
      • 8.8.1 stat=“identity” parameter
    • 8.9 Boxplots
    • 8.10 Fine-tuning text
    • 8.11 Colors
      • 8.11.1 All R colors
      • 8.11.2 Base R palettes
      • 8.11.3 RColorBrewer
      • 8.11.4 ggsci
    • 8.12 Faceting
    • 8.13 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

Part16 Resources

  • RStudio/Tidyverse cheatsheets:
    • RStudio
    • ggplot2
    • dplyr
    • tidyr
    • readr
  • ggplot elegant graphics for data analysis
  • R graph gallery
  • R graphics cookbook
  • ggplot2 extensions
  • Curated list of awesome ggplot2 packages, tutorials, etc.
  • R programming Coursera course(Johns Hopkins University)
  • Official up-to-date introduction to R (from the R Core Team)
  • CRG Biocore intro course to the Tidyverse