Skip to content

colinbousige/R3-ggplot2

Repository files navigation

Reproducibility cycle (3): Making graphs in R with ggplot2

Description

This archive contains the course materials for the 1st course in the reproducibility cycle at URFIST Lyon.

Link to the full course content: https://colinbousige.github.io/rclass/

Author

Colin Bousige, Laboratoire des Multimatériaux et Interfaces, UMR 5615 CNRS-Université Lyon 1, Villeurbanne, France.

Duration

1 day

Objectives

  • Work with the "tidy" data structure and the "tidyverse" package.
  • Understand the structure of a ggplot2 graph.
  • Know the functions associated with the main layers.
  • Master the most common graphical representations (points, lines, histograms, error bars, etc.).

Program

  • Reminders on the organisation of work in R and Rstudio
  • Reminder of how to work with tidy data and the tidyverse package
  • Introduction to the gplot2 package and the grammar of graphics
    • The principle of successive layers
    • Creating a scatterplot, barplot, boxplot, lineplot, etc.
    • Creating a colour map for 3D data
  • Analysing data as a function of multiple variables: facet graphs.
  • Fit your data and display the result
  • Customise your ggplot2 graph:
    • Colour management
    • Managing titles, axes, legends, etc.
    • Adding text and other annotations
    • Using and customising themes
  • Exporting graphs as png, pdf and LaTeX files
  • Make your graphs interactive with plotly.

Prerequisites

No specific scientific field is required: what is covered in this course is suitable for all fields. The participant comes with his/her computer with R and Rstudio installed. The participant has basic knowledge of the R language: creating and manipulating objects in R, installing packages, importing data. Participants are encouraged to bring their own data for more interactive exercises tailored to their needs.

Type of course

Course and practical work. Course content is available online.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages