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

update session_3

parent 103510eb
No related branches found
No related tags found
1 merge request!6Switch to main as default branch
---
title: 'R.3: Transformations with ggplot2'
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)"
date: "2021"
date: "2022"
output:
rmdformats::downcute:
self_contain: true
use_bookdown: true
default_style: "light"
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}
rm(list=ls())
knitr::opts_chunk$set(echo = TRUE)
......@@ -343,7 +349,7 @@ ggplot(data = diamonds, mapping = aes(x = cut, fill = cut)) +
By combining the right **geom**, **coordinates** and **faceting** functions, you can build a large number of different plots to present your results.
# See you in [R.4: data transformation](http://perso.ens-lyon.fr/laurent.modolo/R/session_4/)
# See you in [R.4: data transformation](https://can.gitbiopages.ens-lyon.fr/R_basis/session_4/)
# To go further: animated plots from xls files
......@@ -359,13 +365,13 @@ library(gifski)
```
<div class="pencardre">
Use the `openxlsx` package to save the [http://perso.ens-lyon.fr/laurent.modolo/R/session_3/gapminder.xlsx](http://perso.ens-lyon.fr/laurent.modolo/R/session_3/gapminder.xlsx) file to the `gapminder` variable
Use the `openxlsx` package to save the [https://can.gitbiopages.ens-lyon.fr/R_basis/session_3/gapminder.xlsx](https://can.gitbiopages.ens-lyon.fr/R_basis/session_3/gapminder.xlsx) file to the `gapminder` variable
</div>
<details><summary>Solution</summary>
<p>
```{r load_xlsx}
gapminder <- read.xlsx("http://perso.ens-lyon.fr/laurent.modolo/R/session_3/gapminder.xlsx")
gapminder <- read.xlsx("https://can.gitbiopages.ens-lyon.fr/R_basis/session_3/gapminder.xlsx")
```
</p>
</details>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment