SlideShare a Scribd company logo
1 of 32
Download to read offline
La famille *down
Nathalie Vialaneix & Élise Maigné, INRAe/MIAT
Dynafor, December 3rd 2020
1 / 32
What is Markdown? (*.md files)
According to Wikipedia,
Markdown is a lightweight markup language with plain text formatting syntax. Its
design allows it to be converted to many output formats.
2 / 32
Why Markdown?
formatting text and documents is easy
probably the most used lightweight markup language for numeric documents (especially
technical documentations)
But: is sometimes a bit limited if you want to have custom outputs
3 / 32
What is RMarkdown? (*.Rmd files)
developed by RStudio (and especially by Yihui Xie)
combines Markdown documents with R scripts (or python, C++, bash, ...) to produce
dynamic (and even interactive) documents
4 / 32
What is RMarkdown? (*.Rmd files)
developed by RStudio (and especially by Yihui Xie)
combines Markdown documents with R scripts (or python, C++, bash, ...) to produce
dynamic (and even interactive) documents
also available as R notebooks (similar to Jupyter notebooks)
5 / 32
Basic RMarkdown documents
6 / 32
What do you need? (certified exact on
linux)
R
RStudio (not mandatory but highly recommended) and if you don't know how to install
it on linux, please, ask your sysadmin
packages: at least knitr but other packages (rmarkdown, markdown, ...)
pandoc to obtain different output types from *.md files: Rmd md (with pandoc)
HTML
it is best to have installed to render maths or obtain PDF documents
Basic demo...
→ →
LT XA
E
7 / 32
Yaml headers
8 / 32
Yaml headers
9 / 32
Yaml headers
10 / 32
Text formatting
11 / 32
Text formatting
12 / 32
Code chunk and options
Inline code can be included with
13 / 32
Code chunk and options
Types of chunks:
14 / 32
Code chunk and options
A few useful options:
eval=TRUE/FALSE: run (or not) the code in the chunk
include=TRUE/FALSE: include (or not) the chunk in the final document
echo=TRUE/FALSE: include (or not) the output of the code in the final document
results='markup'/'hide'/'asis'/'hold': display the output of the code
normally/not/as it is (useful when combined with xtable for HTML outputs of tables
for instance)/all in a row after the code chunk is displayed (and not one by one)
error/message/warning=TRUE/FALSE: display (or not) the different types of
messages obtained from the code
cache=TRUE/FALSE: cache the result of the chunk
fig.width/height/align/cap/...: different options on rendering of figures
15 / 32
Run code and output types
Run the whole document:
Run interactively:
16 / 32
Run code and output types
Run the whole document externally:
# render document
knitr::render("mybeautifuldoc.Rmd", output_format = "HTML",
encoding = "UTF-8")
# extract R code from chunk
knitr::purl("mybeautifuldoc.Rmd")
Useful to run a report with computationally intensive code on a server! See:
http://www.nathalievialaneix.eu/doc/pdf/tutoR_cluster.pdf
17 / 32
Run code and output types
HTML: often light and can include interactive graphics (with ggplotly for instance)
HTML and equations can be included directly in the document
But: problems rendering equations without internet connexion, you need to copy
several folders in addition to the file to make it work
problems partially solved with the option: self_contained: true (in
HTML headers)
PDF: self-contained but often heavier, needs installed
usually longer to knit (pandoc produces a TeX document and then is run)
can account for options in the headers (including bibliography)
can use the power of to obtain multiple version documents (student and
teacher versions for instance)
(and, of course, forget Word!)
LT XA
E
LT XA
E
LT XA
E
LT XA
E
LT XA
E
18 / 32
Advanced options for RMarkdown
documents
19 / 32
Appearance and style in HTML
documents
theme (in header) specifies the Bootswatch theme to use
highlight (in header) specifies the highlighting style to use (supports tango,
pygments, kate, monochrome, espresso, zenburn, haddock,
breezedark and textmate)
Or: you can use your own CSS with css (in header)
20 / 32
options in PDF documentsLT XA
E
21 / 32
options in PDF documents
Bibliography is managed using:
the citation engine (default is pandoc-citeproc):
citation_package: natbib (header, in pdf_document)
citation_package: biblatex (header, in pdf_document)
the bibtex file: bibliograph: mybib.bib (header, in pdf_document)
LT XA
E
22 / 32
options in PDF documents
More custom options in headers:
LT XA
E
23 / 32
multiple version document
if version1 
... in teacher version only
fi
LT XA
E
24 / 32
A very cool stuff: parameters!
How were useR! invoices generated (and sent)?
and then, used in the Rmd file through params$participant, params$name, ...
25 / 32
A very cool stuff: parameters!
... or passed externally using render:
## loop over users ##################################################
render("invoice-base.Rmd",
params = list(participant = paste(users$FIRSTNAME[cur], users$
name = users$"Billing.name"[cur],
address1 = users$"Billing.address..street."[cur]
address2 = users$"Billing.address..other."[cur],
address3 = users$"Billing.address..state..town.a
country = users$"Billing.address..country."[cur]
uid = users$UID[cur],
date = gsub("-", "/", as.character(as.Date(saved
total = users$Amount[cur],
method = users$Payment.type[cur],
refpaybox = users$transaction[cur]
),
output_file = paste0("invoices/", file_names[cur]))
# send email
send.mail(from = "contact@user2019.fr",
to = ...,
attach.files = paste0("invoices/", file_names[cur]))
26 / 32
A very cool stuff: parameters!
used to produce automatic report on standard analyses (e.g., differential analysis of
RNAseq data with only two conditions)
used to run standard analyses on multiple datasets at once
parameters can be set interactively using the knit buttom
constrains can be declared for parameters
27 / 32
Want to know more?
R Markdown cheatsheet
R Markdown reference
R Markdown book
28 / 32
Other types of documents
29 / 32
Slides
Using the same approach, you can make:
R presentation (included in R studio) but with rather limited features
(my old class on R was made using it)
xarigan slides (HTML), also developed by Yihui Xie (see Chapter 7 of the R
Markdown book): easy to use and includes many options but if you want to obtain a
custom result, you better be an HTML/CSS ninja, can be exported in PDF with
pagedown::chrome_print (but I do not recommend it)
this presentation was made with xaringan using the rladies css
binb (binb is not beamer) provides functionality to use themes for beamer directly in
RMarkdown: if you want to obtain a custom result, you better be a ninja, output
PDF, long to compile (as beamer is)
(this seminar has been made using binb)
LT XA
E
30 / 32
Also exist...
drposter (example is courtesy of Pierre Neuvial)
pkgdown: Generate cool package documentation from your package SOMbrero
documentation
bookdown: generate printer ready books and ebooks from R Markdown (I never used
it so no feedback...)
blogdown: generate website from RMarkdown pages using hugo (python static
website generator). The missing data reference website is generated through
blogdown and thanks to its hugo support is automatically published on netlify.
31 / 32
Next to come...?
coffeedown... ?
32 / 32

More Related Content

Similar to La famille *down

R Introduction
R IntroductionR Introduction
R Introduction
schamber
 
Overview of the DITA Open Toolkit
Overview of the DITA Open ToolkitOverview of the DITA Open Toolkit
Overview of the DITA Open Toolkit
Suite Solutions
 
2023-02-22_Tiberti_CyberX.pdf
2023-02-22_Tiberti_CyberX.pdf2023-02-22_Tiberti_CyberX.pdf
2023-02-22_Tiberti_CyberX.pdf
cifoxo
 
Input and output in c
Input and output in cInput and output in c
Input and output in c
Rachana Joshi
 

Similar to La famille *down (20)

La famille *down
La famille *downLa famille *down
La famille *down
 
R Introduction
R IntroductionR Introduction
R Introduction
 
Language-agnostic data analysis workflows and reproducible research
Language-agnostic data analysis workflows and reproducible researchLanguage-agnostic data analysis workflows and reproducible research
Language-agnostic data analysis workflows and reproducible research
 
Rmarkdown cheatsheet-2.0
Rmarkdown cheatsheet-2.0Rmarkdown cheatsheet-2.0
Rmarkdown cheatsheet-2.0
 
Overview of the DITA Open Toolkit
Overview of the DITA Open ToolkitOverview of the DITA Open Toolkit
Overview of the DITA Open Toolkit
 
Dart
DartDart
Dart
 
Reproducible research (and literate programming) in R
Reproducible research (and literate programming) in RReproducible research (and literate programming) in R
Reproducible research (and literate programming) in R
 
rmarkdown.pdf
rmarkdown.pdfrmarkdown.pdf
rmarkdown.pdf
 
Rmll2010 html5-css3-english
Rmll2010 html5-css3-englishRmll2010 html5-css3-english
Rmll2010 html5-css3-english
 
2023-02-22_Tiberti_CyberX.pdf
2023-02-22_Tiberti_CyberX.pdf2023-02-22_Tiberti_CyberX.pdf
2023-02-22_Tiberti_CyberX.pdf
 
Typescript for the programmers who like javascript
Typescript for the programmers who like javascriptTypescript for the programmers who like javascript
Typescript for the programmers who like javascript
 
The Big Documentation Extravaganza
The Big Documentation ExtravaganzaThe Big Documentation Extravaganza
The Big Documentation Extravaganza
 
Automating API Documentation
Automating API DocumentationAutomating API Documentation
Automating API Documentation
 
Input and output in c
Input and output in cInput and output in c
Input and output in c
 
Purdue CS354 Operating Systems 2008
Purdue CS354 Operating Systems 2008Purdue CS354 Operating Systems 2008
Purdue CS354 Operating Systems 2008
 
JS Fest 2019. Ryan Dahl. Deno, a new way to JavaScript
JS Fest 2019. Ryan Dahl. Deno, a new way to JavaScriptJS Fest 2019. Ryan Dahl. Deno, a new way to JavaScript
JS Fest 2019. Ryan Dahl. Deno, a new way to JavaScript
 
Nithi
NithiNithi
Nithi
 
Poly_introduction_R.pdf
Poly_introduction_R.pdfPoly_introduction_R.pdf
Poly_introduction_R.pdf
 
Refreshing computer-skills: markdown, mathjax, jupyter, docker, microkernels
Refreshing computer-skills: markdown, mathjax, jupyter, docker, microkernelsRefreshing computer-skills: markdown, mathjax, jupyter, docker, microkernels
Refreshing computer-skills: markdown, mathjax, jupyter, docker, microkernels
 
Php documentor
Php documentorPhp documentor
Php documentor
 

More from tuxette

More from tuxette (20)

Racines en haut et feuilles en bas : les arbres en maths
Racines en haut et feuilles en bas : les arbres en mathsRacines en haut et feuilles en bas : les arbres en maths
Racines en haut et feuilles en bas : les arbres en maths
 
Méthodes à noyaux pour l’intégration de données hétérogènes
Méthodes à noyaux pour l’intégration de données hétérogènesMéthodes à noyaux pour l’intégration de données hétérogènes
Méthodes à noyaux pour l’intégration de données hétérogènes
 
Méthodologies d'intégration de données omiques
Méthodologies d'intégration de données omiquesMéthodologies d'intégration de données omiques
Méthodologies d'intégration de données omiques
 
Projets autour de l'Hi-C
Projets autour de l'Hi-CProjets autour de l'Hi-C
Projets autour de l'Hi-C
 
Can deep learning learn chromatin structure from sequence?
Can deep learning learn chromatin structure from sequence?Can deep learning learn chromatin structure from sequence?
Can deep learning learn chromatin structure from sequence?
 
Multi-omics data integration methods: kernel and other machine learning appro...
Multi-omics data integration methods: kernel and other machine learning appro...Multi-omics data integration methods: kernel and other machine learning appro...
Multi-omics data integration methods: kernel and other machine learning appro...
 
ASTERICS : une application pour intégrer des données omiques
ASTERICS : une application pour intégrer des données omiquesASTERICS : une application pour intégrer des données omiques
ASTERICS : une application pour intégrer des données omiques
 
Autour des projets Idefics et MetaboWean
Autour des projets Idefics et MetaboWeanAutour des projets Idefics et MetaboWean
Autour des projets Idefics et MetaboWean
 
Rserve, renv, flask, Vue.js dans un docker pour intégrer des données omiques ...
Rserve, renv, flask, Vue.js dans un docker pour intégrer des données omiques ...Rserve, renv, flask, Vue.js dans un docker pour intégrer des données omiques ...
Rserve, renv, flask, Vue.js dans un docker pour intégrer des données omiques ...
 
Apprentissage pour la biologie moléculaire et l’analyse de données omiques
Apprentissage pour la biologie moléculaire et l’analyse de données omiquesApprentissage pour la biologie moléculaire et l’analyse de données omiques
Apprentissage pour la biologie moléculaire et l’analyse de données omiques
 
Quelques résultats préliminaires de l'évaluation de méthodes d'inférence de r...
Quelques résultats préliminaires de l'évaluation de méthodes d'inférence de r...Quelques résultats préliminaires de l'évaluation de méthodes d'inférence de r...
Quelques résultats préliminaires de l'évaluation de méthodes d'inférence de r...
 
Intégration de données omiques multi-échelles : méthodes à noyau et autres ap...
Intégration de données omiques multi-échelles : méthodes à noyau et autres ap...Intégration de données omiques multi-échelles : méthodes à noyau et autres ap...
Intégration de données omiques multi-échelles : méthodes à noyau et autres ap...
 
Journal club: Validation of cluster analysis results on validation data
Journal club: Validation of cluster analysis results on validation dataJournal club: Validation of cluster analysis results on validation data
Journal club: Validation of cluster analysis results on validation data
 
Overfitting or overparametrization?
Overfitting or overparametrization?Overfitting or overparametrization?
Overfitting or overparametrization?
 
Selective inference and single-cell differential analysis
Selective inference and single-cell differential analysisSelective inference and single-cell differential analysis
Selective inference and single-cell differential analysis
 
SOMbrero : un package R pour les cartes auto-organisatrices
SOMbrero : un package R pour les cartes auto-organisatricesSOMbrero : un package R pour les cartes auto-organisatrices
SOMbrero : un package R pour les cartes auto-organisatrices
 
Graph Neural Network for Phenotype Prediction
Graph Neural Network for Phenotype PredictionGraph Neural Network for Phenotype Prediction
Graph Neural Network for Phenotype Prediction
 
A short and naive introduction to using network in prediction models
A short and naive introduction to using network in prediction modelsA short and naive introduction to using network in prediction models
A short and naive introduction to using network in prediction models
 
Explanable models for time series with random forest
Explanable models for time series with random forestExplanable models for time series with random forest
Explanable models for time series with random forest
 
Présentation du projet ASTERICS
Présentation du projet ASTERICSPrésentation du projet ASTERICS
Présentation du projet ASTERICS
 

Recently uploaded

Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 bAsymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Sérgio Sacani
 
Bacterial Identification and Classifications
Bacterial Identification and ClassificationsBacterial Identification and Classifications
Bacterial Identification and Classifications
Areesha Ahmad
 
Pests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdfPests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdf
PirithiRaju
 

Recently uploaded (20)

Clean In Place(CIP).pptx .
Clean In Place(CIP).pptx                 .Clean In Place(CIP).pptx                 .
Clean In Place(CIP).pptx .
 
FAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and SpectrometryFAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
 
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 60009654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
 
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls AgencyHire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
 
Feature-aligned N-BEATS with Sinkhorn divergence (ICLR '24)
Feature-aligned N-BEATS with Sinkhorn divergence (ICLR '24)Feature-aligned N-BEATS with Sinkhorn divergence (ICLR '24)
Feature-aligned N-BEATS with Sinkhorn divergence (ICLR '24)
 
Proteomics: types, protein profiling steps etc.
Proteomics: types, protein profiling steps etc.Proteomics: types, protein profiling steps etc.
Proteomics: types, protein profiling steps etc.
 
Forensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdfForensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdf
 
Justdial Call Girls In Indirapuram, Ghaziabad, 8800357707 Escorts Service
Justdial Call Girls In Indirapuram, Ghaziabad, 8800357707 Escorts ServiceJustdial Call Girls In Indirapuram, Ghaziabad, 8800357707 Escorts Service
Justdial Call Girls In Indirapuram, Ghaziabad, 8800357707 Escorts Service
 
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
 
Factory Acceptance Test( FAT).pptx .
Factory Acceptance Test( FAT).pptx       .Factory Acceptance Test( FAT).pptx       .
Factory Acceptance Test( FAT).pptx .
 
GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)
 
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 bAsymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
 
High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑
High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑
High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑
 
module for grade 9 for distance learning
module for grade 9 for distance learningmodule for grade 9 for distance learning
module for grade 9 for distance learning
 
Botany 4th semester series (krishna).pdf
Botany 4th semester series (krishna).pdfBotany 4th semester series (krishna).pdf
Botany 4th semester series (krishna).pdf
 
9999266834 Call Girls In Noida Sector 22 (Delhi) Call Girl Service
9999266834 Call Girls In Noida Sector 22 (Delhi) Call Girl Service9999266834 Call Girls In Noida Sector 22 (Delhi) Call Girl Service
9999266834 Call Girls In Noida Sector 22 (Delhi) Call Girl Service
 
Bacterial Identification and Classifications
Bacterial Identification and ClassificationsBacterial Identification and Classifications
Bacterial Identification and Classifications
 
High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...
High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...
High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...
 
Zoology 4th semester series (krishna).pdf
Zoology 4th semester series (krishna).pdfZoology 4th semester series (krishna).pdf
Zoology 4th semester series (krishna).pdf
 
Pests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdfPests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdf
 

La famille *down

  • 1. La famille *down Nathalie Vialaneix & Élise Maigné, INRAe/MIAT Dynafor, December 3rd 2020 1 / 32
  • 2. What is Markdown? (*.md files) According to Wikipedia, Markdown is a lightweight markup language with plain text formatting syntax. Its design allows it to be converted to many output formats. 2 / 32
  • 3. Why Markdown? formatting text and documents is easy probably the most used lightweight markup language for numeric documents (especially technical documentations) But: is sometimes a bit limited if you want to have custom outputs 3 / 32
  • 4. What is RMarkdown? (*.Rmd files) developed by RStudio (and especially by Yihui Xie) combines Markdown documents with R scripts (or python, C++, bash, ...) to produce dynamic (and even interactive) documents 4 / 32
  • 5. What is RMarkdown? (*.Rmd files) developed by RStudio (and especially by Yihui Xie) combines Markdown documents with R scripts (or python, C++, bash, ...) to produce dynamic (and even interactive) documents also available as R notebooks (similar to Jupyter notebooks) 5 / 32
  • 7. What do you need? (certified exact on linux) R RStudio (not mandatory but highly recommended) and if you don't know how to install it on linux, please, ask your sysadmin packages: at least knitr but other packages (rmarkdown, markdown, ...) pandoc to obtain different output types from *.md files: Rmd md (with pandoc) HTML it is best to have installed to render maths or obtain PDF documents Basic demo... → → LT XA E 7 / 32
  • 13. Code chunk and options Inline code can be included with 13 / 32
  • 14. Code chunk and options Types of chunks: 14 / 32
  • 15. Code chunk and options A few useful options: eval=TRUE/FALSE: run (or not) the code in the chunk include=TRUE/FALSE: include (or not) the chunk in the final document echo=TRUE/FALSE: include (or not) the output of the code in the final document results='markup'/'hide'/'asis'/'hold': display the output of the code normally/not/as it is (useful when combined with xtable for HTML outputs of tables for instance)/all in a row after the code chunk is displayed (and not one by one) error/message/warning=TRUE/FALSE: display (or not) the different types of messages obtained from the code cache=TRUE/FALSE: cache the result of the chunk fig.width/height/align/cap/...: different options on rendering of figures 15 / 32
  • 16. Run code and output types Run the whole document: Run interactively: 16 / 32
  • 17. Run code and output types Run the whole document externally: # render document knitr::render("mybeautifuldoc.Rmd", output_format = "HTML", encoding = "UTF-8") # extract R code from chunk knitr::purl("mybeautifuldoc.Rmd") Useful to run a report with computationally intensive code on a server! See: http://www.nathalievialaneix.eu/doc/pdf/tutoR_cluster.pdf 17 / 32
  • 18. Run code and output types HTML: often light and can include interactive graphics (with ggplotly for instance) HTML and equations can be included directly in the document But: problems rendering equations without internet connexion, you need to copy several folders in addition to the file to make it work problems partially solved with the option: self_contained: true (in HTML headers) PDF: self-contained but often heavier, needs installed usually longer to knit (pandoc produces a TeX document and then is run) can account for options in the headers (including bibliography) can use the power of to obtain multiple version documents (student and teacher versions for instance) (and, of course, forget Word!) LT XA E LT XA E LT XA E LT XA E LT XA E 18 / 32
  • 19. Advanced options for RMarkdown documents 19 / 32
  • 20. Appearance and style in HTML documents theme (in header) specifies the Bootswatch theme to use highlight (in header) specifies the highlighting style to use (supports tango, pygments, kate, monochrome, espresso, zenburn, haddock, breezedark and textmate) Or: you can use your own CSS with css (in header) 20 / 32
  • 21. options in PDF documentsLT XA E 21 / 32
  • 22. options in PDF documents Bibliography is managed using: the citation engine (default is pandoc-citeproc): citation_package: natbib (header, in pdf_document) citation_package: biblatex (header, in pdf_document) the bibtex file: bibliograph: mybib.bib (header, in pdf_document) LT XA E 22 / 32
  • 23. options in PDF documents More custom options in headers: LT XA E 23 / 32
  • 24. multiple version document if version1 ... in teacher version only fi LT XA E 24 / 32
  • 25. A very cool stuff: parameters! How were useR! invoices generated (and sent)? and then, used in the Rmd file through params$participant, params$name, ... 25 / 32
  • 26. A very cool stuff: parameters! ... or passed externally using render: ## loop over users ################################################## render("invoice-base.Rmd", params = list(participant = paste(users$FIRSTNAME[cur], users$ name = users$"Billing.name"[cur], address1 = users$"Billing.address..street."[cur] address2 = users$"Billing.address..other."[cur], address3 = users$"Billing.address..state..town.a country = users$"Billing.address..country."[cur] uid = users$UID[cur], date = gsub("-", "/", as.character(as.Date(saved total = users$Amount[cur], method = users$Payment.type[cur], refpaybox = users$transaction[cur] ), output_file = paste0("invoices/", file_names[cur])) # send email send.mail(from = "contact@user2019.fr", to = ..., attach.files = paste0("invoices/", file_names[cur])) 26 / 32
  • 27. A very cool stuff: parameters! used to produce automatic report on standard analyses (e.g., differential analysis of RNAseq data with only two conditions) used to run standard analyses on multiple datasets at once parameters can be set interactively using the knit buttom constrains can be declared for parameters 27 / 32
  • 28. Want to know more? R Markdown cheatsheet R Markdown reference R Markdown book 28 / 32
  • 29. Other types of documents 29 / 32
  • 30. Slides Using the same approach, you can make: R presentation (included in R studio) but with rather limited features (my old class on R was made using it) xarigan slides (HTML), also developed by Yihui Xie (see Chapter 7 of the R Markdown book): easy to use and includes many options but if you want to obtain a custom result, you better be an HTML/CSS ninja, can be exported in PDF with pagedown::chrome_print (but I do not recommend it) this presentation was made with xaringan using the rladies css binb (binb is not beamer) provides functionality to use themes for beamer directly in RMarkdown: if you want to obtain a custom result, you better be a ninja, output PDF, long to compile (as beamer is) (this seminar has been made using binb) LT XA E 30 / 32
  • 31. Also exist... drposter (example is courtesy of Pierre Neuvial) pkgdown: Generate cool package documentation from your package SOMbrero documentation bookdown: generate printer ready books and ebooks from R Markdown (I never used it so no feedback...) blogdown: generate website from RMarkdown pages using hugo (python static website generator). The missing data reference website is generated through blogdown and thanks to its hugo support is automatically published on netlify. 31 / 32