class: center, middle, inverse, title-slide # Pourquoi RMD? ## Documents reproductibles en R ### Andrew MacDonald ### 2022-02-08 --- ## qu'est-ce que c'est "Markdown"? Un moyen simple d'ajouter une mise en forme au texte .pull-left[ * `**bold**` * `_italic_` * `~~strikethrough~~` ``` `formatted code` ``` ] .pull-right[ * **bold**, * _italic_, * ~~strikethrough~~ `formatted code` ] --- ## qu'est-ce que c'est "Markdown"? format un liste .pull-left[ ```r * ladybird * coccinelle * 🐞 ``` ] .pull-right[ * ladybird * coccinelle * 🐞 ] --- ## qu'est-ce que c'est "Markdown"? format une table .pull-left[ ```r |country |continent | year| lifeExp| pop| gdpPercap| |:-----------|:---------|----:|-------:|--------:|---------:| |Afghanistan |Asia | 1952| 28.801| 8425333| 779.4453| |Afghanistan |Asia | 1957| 30.332| 9240934| 820.8530| |Afghanistan |Asia | 1962| 31.997| 10267083| 853.1007| |Afghanistan |Asia | 1967| 34.020| 11537966| 836.1971| |Afghanistan |Asia | 1972| 36.088| 13079460| 739.9811| |Afghanistan |Asia | 1977| 38.438| 14880372| 786.1134| ``` ] .pull-right[ |country |continent | year| lifeExp| pop| gdpPercap| |:-----------|:---------|----:|-------:|--------:|---------:| |Afghanistan |Asia | 1952| 28.801| 8425333| 779.4453| |Afghanistan |Asia | 1957| 30.332| 9240934| 820.8530| |Afghanistan |Asia | 1962| 31.997| 10267083| 853.1007| |Afghanistan |Asia | 1967| 34.020| 11537966| 836.1971| |Afghanistan |Asia | 1972| 36.088| 13079460| 739.9811| |Afghanistan |Asia | 1977| 38.438| 14880372| 786.1134| ] --- ## qu'est-ce que c'est "Markdown"? format des titres .pull-left[ ```r # header 1 ## header 2 ### header 3 ``` ] .pull-right[ # header 1 ## header 2 ### header 3 ] --- ## qu'est-ce que c'est "Markdown"? format des equations! .pull-left[ ``` $$ {n \choose k}p^k(1-p)^{n-k} $$ ``` ] .pull-right[ $$ {n \choose k}p^k(1-p)^{n-k} $$ ] --- ### .. et bien plus encore ! voir le [Cheat Sheet officiel](et bien plus encore ! ) Ou: Help > Cheat Sheets > R Markdown Cheat Sheet --- class: inverse center middle # Rmarkdown = R + Markdown --- class: inverse center middle  --- ### Code en R, voir les resultats! ```r x <- rnorm(42, 0, 3) y <- rnorm(x * 2.3, 1) plot(y ~ x) ``` --- ### Code en R, voir les resultats! ```r x <- rnorm(42, 0, 3) y <- rnorm(x * 2.3, 1) plot(y ~ x) ``` <img src="08_fev_2022_intro_rmarkdown_files/figure-html/unnamed-chunk-2-1.png" width="100%" /> --- class: inverse center middle # Rmarkdown = R + Markdown ## + knitr + pandoc ### + blogdown + distill ### + rticles + xarigan + ### + htmlwidgets + shiny + ### + flexdashboard --- ## Vite revision des extensions & Resources * [BIOS<sup>2</sup> Education Site](https://bios2.github.io/) fait avec [Distill](https://rstudio.github.io/distill/website.html) * [Julia Silge's Blog](https://juliasilge.com/) fait avec [blogdown](https://bookdown.org/yihui/blogdown/) * [Rmarkdown: the Definitive Guide](https://bookdown.org/yihui/rmarkdown/) ecrit en `bookdown` * [package documentation](https://pkgdown.r-lib.org/) ecrit avec `pkgdown` * [prettydoc](https://prettydoc.statr.me/) pour des documents petits et jolis! * [xarigan](https://github.com/yihui/xaringan) et [xaringanthemer](https://github.com/gadenbuie/xaringanthemer) pour les diapos, y compris celles-ci !