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

La famille *down
La famille *downLa famille *down
La famille *downtuxette
 
R Introduction
R IntroductionR Introduction
R Introductionschamber
 
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 researchAndrew Lowe
 
Overview of the DITA Open Toolkit
Overview of the DITA Open ToolkitOverview of the DITA Open Toolkit
Overview of the DITA Open ToolkitSuite Solutions
 
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 Rliz__is
 
rmarkdown.pdf
rmarkdown.pdfrmarkdown.pdf
rmarkdown.pdfTheZephyr
 
Rmll2010 html5-css3-english
Rmll2010 html5-css3-englishRmll2010 html5-css3-english
Rmll2010 html5-css3-englishFnot
 
2023-02-22_Tiberti_CyberX.pdf
2023-02-22_Tiberti_CyberX.pdf2023-02-22_Tiberti_CyberX.pdf
2023-02-22_Tiberti_CyberX.pdfcifoxo
 
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 javascriptAndrei Sebastian Cîmpean
 
The Big Documentation Extravaganza
The Big Documentation ExtravaganzaThe Big Documentation Extravaganza
The Big Documentation ExtravaganzaStephan Schmidt
 
Automating API Documentation
Automating API DocumentationAutomating API Documentation
Automating API DocumentationSelvakumar T S
 
Input and output in c
Input and output in cInput and output in c
Input and output in cRachana Joshi
 
Purdue CS354 Operating Systems 2008
Purdue CS354 Operating Systems 2008Purdue CS354 Operating Systems 2008
Purdue CS354 Operating Systems 2008guestd9065
 
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 JavaScriptJSFestUA
 
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, microkernelsrinnocente
 

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

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 mathstuxette
 
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ènestuxette
 
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 omiquestuxette
 
Projets autour de l'Hi-C
Projets autour de l'Hi-CProjets autour de l'Hi-C
Projets autour de l'Hi-Ctuxette
 
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?tuxette
 
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...tuxette
 
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 omiquestuxette
 
Autour des projets Idefics et MetaboWean
Autour des projets Idefics et MetaboWeanAutour des projets Idefics et MetaboWean
Autour des projets Idefics et MetaboWeantuxette
 
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 ...tuxette
 
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 omiquestuxette
 
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...tuxette
 
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...tuxette
 
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 datatuxette
 
Overfitting or overparametrization?
Overfitting or overparametrization?Overfitting or overparametrization?
Overfitting or overparametrization?tuxette
 
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 analysistuxette
 
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-organisatricestuxette
 
Graph Neural Network for Phenotype Prediction
Graph Neural Network for Phenotype PredictionGraph Neural Network for Phenotype Prediction
Graph Neural Network for Phenotype Predictiontuxette
 
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 modelstuxette
 
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 foresttuxette
 
Présentation du projet ASTERICS
Présentation du projet ASTERICSPrésentation du projet ASTERICS
Présentation du projet ASTERICStuxette
 

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

Microphone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptxMicrophone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptxpriyankatabhane
 
preservation, maintanence and improvement of industrial organism.pptx
preservation, maintanence and improvement of industrial organism.pptxpreservation, maintanence and improvement of industrial organism.pptx
preservation, maintanence and improvement of industrial organism.pptxnoordubaliya2003
 
Sulphur & Phosphrus Cycle PowerPoint Presentation (2) [Autosaved]-3-1.pptx
Sulphur & Phosphrus Cycle PowerPoint Presentation (2) [Autosaved]-3-1.pptxSulphur & Phosphrus Cycle PowerPoint Presentation (2) [Autosaved]-3-1.pptx
Sulphur & Phosphrus Cycle PowerPoint Presentation (2) [Autosaved]-3-1.pptxnoordubaliya2003
 
Grafana in space: Monitoring Japan's SLIM moon lander in real time
Grafana in space: Monitoring Japan's SLIM moon lander  in real timeGrafana in space: Monitoring Japan's SLIM moon lander  in real time
Grafana in space: Monitoring Japan's SLIM moon lander in real timeSatoshi NAKAHIRA
 
User Guide: Magellan MX™ Weather Station
User Guide: Magellan MX™ Weather StationUser Guide: Magellan MX™ Weather Station
User Guide: Magellan MX™ Weather StationColumbia Weather Systems
 
BUMI DAN ANTARIKSA PROJEK IPAS SMK KELAS X.pdf
BUMI DAN ANTARIKSA PROJEK IPAS SMK KELAS X.pdfBUMI DAN ANTARIKSA PROJEK IPAS SMK KELAS X.pdf
BUMI DAN ANTARIKSA PROJEK IPAS SMK KELAS X.pdfWildaNurAmalia2
 
OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024innovationoecd
 
Scheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docxScheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docxyaramohamed343013
 
Analytical Profile of Coleus Forskohlii | Forskolin .pptx
Analytical Profile of Coleus Forskohlii | Forskolin .pptxAnalytical Profile of Coleus Forskohlii | Forskolin .pptx
Analytical Profile of Coleus Forskohlii | Forskolin .pptxSwapnil Therkar
 
TOPIC 8 Temperature and Heat.pdf physics
TOPIC 8 Temperature and Heat.pdf physicsTOPIC 8 Temperature and Heat.pdf physics
TOPIC 8 Temperature and Heat.pdf physicsssuserddc89b
 
User Guide: Orion™ Weather Station (Columbia Weather Systems)
User Guide: Orion™ Weather Station (Columbia Weather Systems)User Guide: Orion™ Weather Station (Columbia Weather Systems)
User Guide: Orion™ Weather Station (Columbia Weather Systems)Columbia Weather Systems
 
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCRCall Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCRlizamodels9
 
User Guide: Pulsar™ Weather Station (Columbia Weather Systems)
User Guide: Pulsar™ Weather Station (Columbia Weather Systems)User Guide: Pulsar™ Weather Station (Columbia Weather Systems)
User Guide: Pulsar™ Weather Station (Columbia Weather Systems)Columbia Weather Systems
 
Davis plaque method.pptx recombinant DNA technology
Davis plaque method.pptx recombinant DNA technologyDavis plaque method.pptx recombinant DNA technology
Davis plaque method.pptx recombinant DNA technologycaarthichand2003
 
Neurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 trNeurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 trssuser06f238
 
Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...Nistarini College, Purulia (W.B) India
 
Pests of Bengal gram_Identification_Dr.UPR.pdf
Pests of Bengal gram_Identification_Dr.UPR.pdfPests of Bengal gram_Identification_Dr.UPR.pdf
Pests of Bengal gram_Identification_Dr.UPR.pdfPirithiRaju
 
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptxSTOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptxMurugaveni B
 
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝soniya singh
 

Recently uploaded (20)

Microphone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptxMicrophone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptx
 
preservation, maintanence and improvement of industrial organism.pptx
preservation, maintanence and improvement of industrial organism.pptxpreservation, maintanence and improvement of industrial organism.pptx
preservation, maintanence and improvement of industrial organism.pptx
 
Sulphur & Phosphrus Cycle PowerPoint Presentation (2) [Autosaved]-3-1.pptx
Sulphur & Phosphrus Cycle PowerPoint Presentation (2) [Autosaved]-3-1.pptxSulphur & Phosphrus Cycle PowerPoint Presentation (2) [Autosaved]-3-1.pptx
Sulphur & Phosphrus Cycle PowerPoint Presentation (2) [Autosaved]-3-1.pptx
 
Grafana in space: Monitoring Japan's SLIM moon lander in real time
Grafana in space: Monitoring Japan's SLIM moon lander  in real timeGrafana in space: Monitoring Japan's SLIM moon lander  in real time
Grafana in space: Monitoring Japan's SLIM moon lander in real time
 
User Guide: Magellan MX™ Weather Station
User Guide: Magellan MX™ Weather StationUser Guide: Magellan MX™ Weather Station
User Guide: Magellan MX™ Weather Station
 
Hot Sexy call girls in Moti Nagar,🔝 9953056974 🔝 escort Service
Hot Sexy call girls in  Moti Nagar,🔝 9953056974 🔝 escort ServiceHot Sexy call girls in  Moti Nagar,🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Moti Nagar,🔝 9953056974 🔝 escort Service
 
BUMI DAN ANTARIKSA PROJEK IPAS SMK KELAS X.pdf
BUMI DAN ANTARIKSA PROJEK IPAS SMK KELAS X.pdfBUMI DAN ANTARIKSA PROJEK IPAS SMK KELAS X.pdf
BUMI DAN ANTARIKSA PROJEK IPAS SMK KELAS X.pdf
 
OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024
 
Scheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docxScheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docx
 
Analytical Profile of Coleus Forskohlii | Forskolin .pptx
Analytical Profile of Coleus Forskohlii | Forskolin .pptxAnalytical Profile of Coleus Forskohlii | Forskolin .pptx
Analytical Profile of Coleus Forskohlii | Forskolin .pptx
 
TOPIC 8 Temperature and Heat.pdf physics
TOPIC 8 Temperature and Heat.pdf physicsTOPIC 8 Temperature and Heat.pdf physics
TOPIC 8 Temperature and Heat.pdf physics
 
User Guide: Orion™ Weather Station (Columbia Weather Systems)
User Guide: Orion™ Weather Station (Columbia Weather Systems)User Guide: Orion™ Weather Station (Columbia Weather Systems)
User Guide: Orion™ Weather Station (Columbia Weather Systems)
 
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCRCall Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
 
User Guide: Pulsar™ Weather Station (Columbia Weather Systems)
User Guide: Pulsar™ Weather Station (Columbia Weather Systems)User Guide: Pulsar™ Weather Station (Columbia Weather Systems)
User Guide: Pulsar™ Weather Station (Columbia Weather Systems)
 
Davis plaque method.pptx recombinant DNA technology
Davis plaque method.pptx recombinant DNA technologyDavis plaque method.pptx recombinant DNA technology
Davis plaque method.pptx recombinant DNA technology
 
Neurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 trNeurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 tr
 
Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...
 
Pests of Bengal gram_Identification_Dr.UPR.pdf
Pests of Bengal gram_Identification_Dr.UPR.pdfPests of Bengal gram_Identification_Dr.UPR.pdf
Pests of Bengal gram_Identification_Dr.UPR.pdf
 
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptxSTOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
 
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
 

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