Skip to content

Commit 3c6dd14

Browse files
committed
Learnrs of module 1
1 parent cbff931 commit 3c6dd14

File tree

3 files changed

+60
-28
lines changed

3 files changed

+60
-28
lines changed

inst/tutorials/A00La_discovery/A00La_discovery.Rmd

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ author: "Guyliann Engels & Philippe Grosjean"
44
description: "**SDD I** Découverte des tutoriels de type \"learnr\"."
55
tutorial:
66
id: "A00La_discovery"
7-
version: 2.0.0/5
7+
version: 3.0.0/5
88
output:
99
learnr::tutorial:
1010
progressive: true
@@ -42,36 +42,13 @@ library(SciViews)
4242
library(readxl)
4343
library(testthat)
4444
library(equatags)
45-
4645
```
4746

4847
```{r, echo=FALSE}
4948
BioDataScience1::learnr_banner()
5049
```
5150

5251
```{r, context="server"}
53-
#observe({
54-
# session_user <- session$user
55-
# if (!is.null(session_user) && session_user != "rstudio-connect") {
56-
# # Get more data from the users database
57-
# users <- try(mongolite::mongo("users", url = "mongodb://127.0.0.1/sdd"), silent = TRUE)
58-
# if (inherits(users, "try-error"))
59-
# message("Impossible to connect to the users database.")
60-
# query <- paste0('{ "login": "', session_user, '" }')
61-
# fields <- '{ "login": true, "email": true, "firstname": true, "lastname": true, "iemail": true, "iid": true, "ifirstname": true, "ilastname": true, "icourse": true, "ictitle": true, "iurl": true, "institution": true, "iref": true, "_id": false }'
62-
# if (!users$count(query)) {
63-
# message("User '", session_user, "' not found in the users table.")
64-
# user_info <- list(login = session_user) # Minimal info...
65-
# } else {
66-
# user_info <- as.list(users$find(query, fields)[1L, ])
67-
# }
68-
# try(users$disconnect(), silent = TRUE)
69-
# } else {# Try getting user data from the URL query string
70-
# user_info <- parseQueryString(session$clientData$url_search)
71-
# }
72-
# options(learnitdown_learnr_user = user_info)
73-
#})
74-
#
7552
BioDataScience1::learnr_server(input, output, session)
7653
```
7754

inst/tutorials/A01La_base/A01La_base.Rmd

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ author : "Guyliann Engels & Philippe Grosjean"
44
description: "**SDD I Module 1** Les bases de l'utilisation de R."
55
tutorial:
66
id: "A01La_base"
7-
version: 2.0.1/7
7+
version: 3.0.0/7
88
output:
99
learnr::tutorial:
1010
progressive: true
@@ -15,6 +15,33 @@ runtime: shiny_prerendered
1515
```{r setup, include=FALSE}
1616
BioDataScience1::learnr_setup()
1717
SciViews::R()
18+
# Required for RSConnect
19+
# SciViews::R
20+
library(rlang)
21+
library(data.table)
22+
library(ggplot2)
23+
library(tibble)
24+
library(tidyr)
25+
library(dplyr)
26+
library(dtplyr)
27+
library(broom)
28+
library(forcats)
29+
library(collapse)
30+
library(fs)
31+
library(data.trame)
32+
library(svFast)
33+
library(svTidy)
34+
library(svMisc)
35+
library(svBase)
36+
library(svFlow)
37+
library(data.io)
38+
library(chart)
39+
library(tabularise)
40+
library(SciViews)
41+
# ...more
42+
library(readxl)
43+
library(testthat)
44+
library(equatags)
1845
```
1946

2047
```{r, echo=FALSE}

inst/tutorials/A01Lb_scatterplot/A01Lb_scatterplot.Rmd

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ author : "Guyliann Engels & Philippe Grosjean"
44
description: "**SDD I Module 1** Réalisation de graphiques en nuage de points."
55
tutorial:
66
id: "A01Lb_scatterplot"
7-
version: 2.5.0/6
7+
version: 3.0.0/6
88
output:
99
learnr::tutorial:
1010
progressive: true
@@ -16,6 +16,33 @@ runtime: shiny_prerendered
1616
```{r setup, include=FALSE}
1717
BioDataScience1::learnr_setup()
1818
SciViews::R(lang = "fr")
19+
# Required for RSConnect
20+
# SciViews::R
21+
library(rlang)
22+
library(data.table)
23+
library(ggplot2)
24+
library(tibble)
25+
library(tidyr)
26+
library(dplyr)
27+
library(dtplyr)
28+
library(broom)
29+
library(forcats)
30+
library(collapse)
31+
library(fs)
32+
library(data.trame)
33+
library(svFast)
34+
library(svTidy)
35+
library(svMisc)
36+
library(svBase)
37+
library(svFlow)
38+
library(data.io)
39+
library(chart)
40+
library(tabularise)
41+
library(SciViews)
42+
# ... more
43+
library(readxl)
44+
library(testthat)
45+
library(equatags)
1946
# Dataset
2047
urchin <- read(file = "urchin_bio", package = "data.io")
2148
```
@@ -69,7 +96,7 @@ chart(data = urchin, height ~ weight) +
6996

7097
## Retour sur la vidéo
7198

72-
Commencez par réaliser les graphiques vus durant la capsule vidéo.
99+
Commencez par réaliser les graphiques vus dans la capsule vidéo du cours.
73100

74101
### Exercice 1
75102

@@ -285,7 +312,8 @@ a <- chart(data = urchin, height ~ weight %col=% origin) +
285312
b <- chart(data = urchin, log(height) ~ log(weight) %col=% origin) +
286313
geom_point()
287314
288-
combine_charts(list(a, b), labels = NULL, common.legend = TRUE, legend = "right")
315+
# partial arguments matching: leg$height instead of leg$heights and leg$width instead of leg$widths in ggpubr::.plot_grid()
316+
suppressWarnings(combine_charts(list(a, b), labels = NULL, common.legend = TRUE, legend = "right"))
289317
```
290318

291319
Réalisez par vous-mêmes le graphique de droite montrant le **logarithme de la hauteur** en ordonnée et le **logarithme de la masse** en abscisse. Utilisez la couleur pour différencier l'origine des individus.

0 commit comments

Comments
 (0)