You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Vérifier l'acquisition des notions relatives aux diagrammes en violon
44
44
45
-
<!--- **Ce test comporte des questions théoriques ainsi que des questions pratiques. Ce test est certificatif.** -->
46
-
47
45
## Biométrie humaine
48
46
49
47
Intéressez vous au jeu de données sur la biométrie humaine ci-dessous.
@@ -63,24 +61,24 @@ chart(biometry, formula = ~ age | gender) +
63
61
```
64
62
65
63
```{r histo_h3, exercise = TRUE}
66
-
chart(___, formula = ~ ___ ___ ___) +
64
+
chart(data = ___, ~ ___ ___ ___) +
67
65
___(___)
68
66
```
69
67
70
68
```{r histo_h3-hint-1}
71
-
chart(DF, formula = ~ ___ | ___) +
69
+
chart(data = DF, ~ ___ | ___) +
72
70
geom_histogram(___)
73
71
```
74
72
75
73
```{r histo_h3-hint-2}
76
-
chart(biometry, formula = ~ NUM | FACTOR) +
74
+
chart(data = biometry, ~ NUM | FACTOR) +
77
75
geom_histogram(bins = ___)
78
76
79
77
#### Attention : solution dans le 'hint' suivant! ####
80
78
```
81
79
82
80
```{r histo_h3-solution}
83
-
chart(biometry, formula = ~ age | gender) +
81
+
chart(data = biometry, ~ age | gender) +
84
82
geom_histogram(bins = 30)
85
83
```
86
84
@@ -93,29 +91,29 @@ grade_code("Vous venez de réaliser votre premier histogramme !")
93
91
Reproduisez le graphique suivant qui représente la répartition de la densité de la hauteur (`height`) en fonction du genre (`gender`) des individus présents dans le jeu de données `biometry`.
94
92
95
93
```{r density_intro}
96
-
chart(biometry, formula = ~ height %fill=% gender) +
94
+
chart(data = biometry, ~ height %fill=% gender) +
97
95
geom_density()
98
96
```
99
97
100
98
```{r density_h3, exercise = TRUE}
101
-
chart(___, formula = ~ ___ ___ ___) +
99
+
chart(data = ___, ~ ___ ___ ___) +
102
100
___()
103
101
```
104
102
105
103
```{r density_h3-hint-1}
106
-
chart(DF, formula = ~ ___ %fill=% ___) +
104
+
chart(data = DF, ~ ___ %fill=% ___) +
107
105
geom_density()
108
106
```
109
107
110
108
```{r density_h3-hint-2}
111
-
chart(biometry, formula = ~ NUM %fill=% FACTOR) +
109
+
chart(data = biometry, ~ NUM %fill=% FACTOR) +
112
110
geom_density()
113
111
114
112
#### Attention : solution dans le 'hint' suivant! ####
115
113
```
116
114
117
115
```{r density_h3-solution}
118
-
chart(biometry, formula = ~ height %fill=% gender) +
116
+
chart(data = biometry, ~ height %fill=% gender) +
119
117
geom_density()
120
118
```
121
119
@@ -130,29 +128,29 @@ Reproduisez le graphique suivant qui représente la répartition de la densité
130
128
**Nom du jeu de données et des variables importantes**
131
129
132
130
```{r violin_intro}
133
-
chart(biometry, formula = height ~ gender) +
131
+
chart(data = biometry, height ~ gender) +
134
132
geom_violin()
135
133
```
136
134
137
135
```{r violin_h3, exercise = TRUE}
138
-
chart(___, formula = ___ ~ ___) +
136
+
chart(data = ___, ___ ~ ___) +
139
137
___()
140
138
```
141
139
142
140
```{r violin_h3-hint-1}
143
-
chart(DF, formula = ___ ~ ___) +
141
+
chart(data = DF, ___ ~ ___) +
144
142
geom_violin()
145
143
```
146
144
147
145
```{r violin_h3-hint-2}
148
-
chart(biometry, formula = NUM ~ FACTOR) +
146
+
chart(data = biometry, NUM ~ FACTOR) +
149
147
geom_violin()
150
148
151
149
#### Attention : solution dans le 'hint' suivant! ####
152
150
```
153
151
154
152
```{r violin_h3-solution}
155
-
chart(biometry, formula = height ~ gender) +
153
+
chart(data = biometry, height ~ gender) +
156
154
geom_violin()
157
155
```
158
156
@@ -178,33 +176,33 @@ Reproduisez le graphique suivant qui représente la répartition de taille (`siz
178
176
**Nom du jeu de données et des variables importantes**
179
177
180
178
```{r violin2_intro}
181
-
chart(copepoda, size ~ class %fill=% class) +
179
+
chart(data = copepoda, size ~ class %fill=% class) +
182
180
geom_violin(show.legend = FALSE) +
183
181
coord_flip()
184
182
```
185
183
186
184
```{r violin2_h3, exercise = TRUE}
187
-
chart(___, ___ ~ ___ ___ ___) +
185
+
chart(data = ___, ___ ~ ___ ___ ___) +
188
186
geom_violin(show.legend = ___) +
189
187
___
190
188
```
191
189
192
190
```{r violin2_h3-hint-1}
193
-
chart(DF, ___ ~ ___ %fill=% ___) +
191
+
chart(data = DF, ___ ~ ___ %fill=% ___) +
194
192
geom_violin(show.legend = ___) +
195
193
___
196
194
```
197
195
198
196
```{r violin2_h3-hint-2}
199
-
chart(biometry, NUM ~ FACTOR %fill=% FACTOR) +
197
+
chart(data = biometry, NUM ~ FACTOR %fill=% FACTOR) +
200
198
geom_violin(show.legend = FALSE) +
201
199
___
202
200
203
201
#### Attention : solution dans le 'hint' suivant! ####
204
202
```
205
203
206
204
```{r violin2_h3-solution}
207
-
chart(copepoda, size ~ class %fill=% class) +
205
+
chart(data = copepoda, size ~ class %fill=% class) +
208
206
geom_violin(show.legend = FALSE) +
209
207
coord_flip()
210
208
```
@@ -218,33 +216,33 @@ grade_code("Et une nouvelle fonction de plus pour améliorer la représentation
218
216
Reproduisez le graphique suivant qui représente la répartition de taille (`size`) en fonction de la classe (`class`) des copépodes présents dans le jeu de données `copepoda` en utilisant la fonction `geom_density_ridges()` du package `ggridges`. Masquez la légende en utilisant l'argument `show.legend`
219
217
220
218
```{r ggridges_intro}
221
-
chart(copepoda, class ~ size %fill=% class) +
219
+
chart(data = copepoda, class ~ size %fill=% class) +
chart(data = copepoda, FACTOR ~ NUM %fill=% FACTOR) +
240
238
geom_density_ridges(show.legend = ___)
241
239
242
240
#### Attention : solution dans le 'hint' suivant! ####
243
241
```
244
242
245
243
```{r ggridges_h3-solution}
246
244
library(ggridges)
247
-
chart(copepoda, class ~ size %fill=% class) +
245
+
chart(data = copepoda, class ~ size %fill=% class) +
248
246
geom_density_ridges(show.legend = FALSE)
249
247
```
250
248
@@ -257,27 +255,27 @@ grade_code("Félicitation ! Vous maitrisez un nouveau type de graphique.")
257
255
Reproduisez le graphique suivant qui représente la répartition de taille (`size`) en fonction de la classe (`class`) du zooplancton présent dans le jeu de données `zooplankton` en utilisant la fonction `geom_density_ridges()` du package `ggridges`.
258
256
259
257
```{r ggridges2_intro}
260
-
chart(zooplankton, class ~ size) +
258
+
chart(data = zooplankton, class ~ size) +
261
259
ggridges::geom_density_ridges()
262
260
```
263
261
264
262
```{r ggridges2_h2, exercise = TRUE}
265
263
library(ggridges)
266
-
chart(___, ___ ~ ___) +
264
+
chart(data = ___, ___ ~ ___) +
267
265
___()
268
266
```
269
267
270
268
```{r ggridges2_h2-hint}
271
269
library(ggridges)
272
-
chart(DF, FACTOR ~ NUM) +
270
+
chart(data = DF, FACTOR ~ NUM) +
273
271
geom_density_ridges()
274
272
275
273
#### Attention : solution dans le 'hint' suivant! ####
276
274
```
277
275
278
276
```{r ggridges2_h2-solution}
279
277
library(ggridges)
280
-
chart(zooplankton, class ~ size) +
278
+
chart(data = zooplankton, class ~ size) +
281
279
geom_density_ridges()
282
280
```
283
281
@@ -299,29 +297,29 @@ Intéressez vous au jeu de données sur la biométrie d'oursin ci-dessous.
299
297
À partir du jeu de données `urchin`, reproduisez le graphique suivant qui représente la variation de la taille (`height`) en fonction de la masse (`weight`) des oursins. L'orgine (`origin`) de ces derniers est mis en évidence par la couleur.
@@ -334,34 +332,33 @@ grade_code("C'est parfait ! Vous vous souvenez comment on fait un graphique en n
334
332
À partir du jeu de données `urchin`, reproduisez le graphique suivant qui représente la variation de la taille (`height`) en fonction de la masse (`weight`) des oursins. L'orgine (`origin`) et le sexe (`sex`) de ces derniers sont mis en évidence par la couleur et la forme, respectivement.
0 commit comments