Skip to content
Snippets Groups Projects
Commit 151fa130 authored by Carine Rey's avatar Carine Rey
Browse files

update session_2

parent 8ccf7078
No related merge requests found
Pipeline #365 passed
--- ---
title: "R.2: introduction to Tidyverse" title: "R.2: introduction to Tidyverse"
author: "Laurent Modolo [laurent.modolo@ens-lyon.fr](mailto:laurent.modolo@ens-lyon.fr), Hélène Polvèche [hpolveche@istem.fr](mailto:hpolveche@istem.fr)" author: "Laurent Modolo [laurent.modolo@ens-lyon.fr](mailto:laurent.modolo@ens-lyon.fr);\nHélène Polvèche [hpolveche@istem.fr](mailto:hpolveche@istem.fr)"
date: "2021" date: "2022"
output: output:
rmdformats::downcute: rmdformats::downcute:
self_contain: true self_contain: true
use_bookdown: true use_bookdown: true
default_style: "light" default_style: "light"
lightbox: true lightbox: true
css: "http://perso.ens-lyon.fr/laurent.modolo/R/src/style.css" css: "../www/style_Rmd.css"
--- ---
```{r include=FALSE}
library(fontawesome)
```
 `r fa(name = "fas fa-house", fill = "grey", height = "1em")`  https://can.gitbiopages.ens-lyon.fr/R_basis/
```{r setup, include=FALSE} ```{r setup, include=FALSE}
rm(list=ls()) rm(list=ls())
knitr::opts_chunk$set(echo = TRUE) knitr::opts_chunk$set(echo = TRUE)
...@@ -500,7 +506,7 @@ ggplot(data = mpg, mapping = aes(x = displ, y = hwy, color = drv)) + ...@@ -500,7 +506,7 @@ ggplot(data = mpg, mapping = aes(x = displ, y = hwy, color = drv)) +
</p> </p>
</details> </details>
## See you in [R.3: Transformations with ggplot2](http://perso.ens-lyon.fr/laurent.modolo/R/session_3/) ## See you in [R.3: Transformations with ggplot2](https://can.gitbiopages.ens-lyon.fr/R_basis/session_3/)
# To go further: publication ready plots # To go further: publication ready plots
...@@ -537,10 +543,17 @@ p1 + theme_minimal() ...@@ -537,10 +543,17 @@ p1 + theme_minimal()
You may have to combine several plots, for that you can use the `cowplot` package which is a `ggplot2` extension. You may have to combine several plots, for that you can use the `cowplot` package which is a `ggplot2` extension.
First install it : First install it :
```{r, eval=F} ```{r, eval=F}
install.packages("cowplot") install.packages("cowplot")
``` ```
```{r, include=F, echo =F}
if (! require("cowplot")) {
install.packages("cowplot")
}
```
Then you can use the function `plot` grid to combine plots in a publication ready style: Then you can use the function `plot` grid to combine plots in a publication ready style:
```{r,message=FALSE} ```{r,message=FALSE}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment