Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R_basis
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CAN
R_basis
Commits
151fa130
Commit
151fa130
authored
2 years ago
by
Carine Rey
Browse files
Options
Downloads
Patches
Plain Diff
update session_2
parent
8ccf7078
Loading
Loading
No related merge requests found
Pipeline
#365
passed
2 years ago
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
session_2/session_2.Rmd
+17
-4
17 additions, 4 deletions
session_2/session_2.Rmd
with
17 additions
and
4 deletions
session_2/session_2.Rmd
+
17
−
4
View file @
151fa130
---
---
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)
;\n
Hélène Polvèche [hpolveche@istem.fr](mailto:hpolveche@istem.fr)"
date: "202
1
"
date: "202
2
"
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](http
s
://
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}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment