Skip to content

Commit ae02db4

Browse files
update of the learnR of the first 3 modules
1 parent 9ac3f08 commit ae02db4

27 files changed

+389
-3703
lines changed

inst/tutorials/A02La_base/A02La_base.html

Lines changed: 0 additions & 890 deletions
This file was deleted.

inst/tutorials/A02Lb_progression/A02Lb_progression.Rmd

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ author : "Guyliann Engels & Philippe Grosjean"
44
description: "**SDD I Module 2** Familiarisation avec R en utilisant une étude sur l'obésité."
55
tutorial:
66
id: "A02Lb_progression"
7-
version: 2.0.0/10
7+
version: 2.1.0/10
88
output:
99
learnr::tutorial:
1010
progressive: true
@@ -529,10 +529,10 @@ biometry <- mutate(biometry, bmi = weight / (height / 100)^2)
529529
# Ajouter la nouvelles variable
530530
___ <- mutate(___,
531531
bmi_cat = case_when(
532-
bmi ~ "underweight",
533-
bmi ~ "normal weight",
534-
bmi ~"overweight",
535-
bmi ~ "obese"
532+
bmi ___ ___~ "underweight",
533+
bmi ___ ___~ "normal weight",
534+
bmi ___ ___~"overweight",
535+
bmi ___ ___~ "obese"
536536
))
537537
# Afficher le début du tableau
538538
head(___)

inst/tutorials/A02Lb_progression/A02Lb_progression.html

Lines changed: 0 additions & 1606 deletions
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

inst/tutorials/A02Lc_nuage/A02Lc_nuage.Rmd

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ author : "Guyliann Engels & Philippe Grosjean"
44
description: "**SDD I Module 2** Réalisation de graphiques en nuages de points dans R."
55
tutorial:
66
id: "A02Lc_nuage"
7-
version: 2.0.0/6
7+
version: 2.1.0/6
88
output:
99
learnr::tutorial:
1010
progressive: true
@@ -61,7 +61,7 @@ Les instructions de base afin de produire un nuage de points sont :
6161

6262
```{r, eval=FALSE, echo = TRUE}
6363
# Importation du jeu de données
64-
urchin <- read("urchin_bio", package = "data.io")
64+
urchin <- read("urchin_bio", package = "data.io", lang = "fr")
6565
# Réalisation du graphique
6666
chart(urchin, formula = height ~ weight) +
6767
geom_point()
@@ -76,8 +76,6 @@ Commencez par réaliser rapidement les graphiques vus durant la capsule vidéo.
7676
Le jeu de données `urchin_bio` portant sur la biométrie d'oursins est assigné à `urchin`. Les variables employées pour ce premier graphique sont la masse du squelette (`skeleton`) et la masse totale (`weight`).
7777

7878
```{r first_graph_intro}
79-
# Importation du jeu de données
80-
urchin <- read("urchin_bio", package = "data.io")
8179
# Réalisation du graphique
8280
chart(urchin, formula = skeleton ~ weight) +
8381
geom_point()
@@ -206,7 +204,7 @@ a <- chart(urchin, formula = lantern ~ test %alpha=% origin) +
206204
b <- chart(urchin, formula = lantern ~ test %shape=% origin) +
207205
geom_point(na.rm = TRUE)
208206
209-
ggpubr::ggarrange(a,b)
207+
combine_charts(list(a,b), labels = NULL)
210208
```
211209

212210
> **A noter :** Nous pouvons observer que l'utilisation de la forme n'est pas forcément l'argument le plus judicieux dans cet exemple.
@@ -258,7 +256,7 @@ Vous pouvez observer qu'une première ligne de code vous est fournies afin de re
258256
```{r 2factor_graph_h3, exercise=TRUE}
259257
urchin <- dplyr::filter(urchin, sex != "NA")
260258
261-
chart(___, formula = ___ ~ ___ ___ ___ ___ ___) +
259+
chart(___, formula = ___ ~ ___ %col=% ___ ___ ___) +
262260
geom_point(___)
263261
```
264262

@@ -298,7 +296,8 @@ a <- chart(urchin, formula = height ~ weight %col=% origin) +
298296
geom_point(na.rm = TRUE)
299297
b <- chart(urchin, formula = log(height) ~ log(weight) %col=% origin) +
300298
geom_point(na.rm = TRUE)
301-
ggpubr::ggarrange(a,b, common.legend = TRUE, legend = "right")
299+
300+
combine_charts(list(a,b), labels = NULL, common.legend = TRUE, legend = "right")
302301
```
303302

304303
Réalisez un nuage de points montrant le **logarithme de la masse** en ordonnée et le **logarithme de la masse immergée** en abscisse. Utilisez la couleur afin de différencier l'origine des individus et précisez à nouveau qu'il y a des valeurs manquantes.
Binary file not shown.

0 commit comments

Comments
 (0)