[1] "Mon Jun 10 07:34:32 2024"
RaukR 2024 • Advanced R for Bioinformatics
Roy Francis
21-Jun-2024
An open-source scientific and technical publishing system built on Pandoc




.qmd
---
title: "This is a title"
format: html
---
Render to PDF format
Requires LaTeX installation
pdf-engine as neededChange YAML options

For PDF options, see here
revealjsFor RevealJS options, see here

Metadata (YAML)
Text (Markdown)
Code (R, Python, Julia, Observable)
Literate programming is natural language interspersed with programming code for the purpose of documentation, reproducibility and accessibility particularly relevant in data science.
---
key: value
---
format:
html:
smooth-scroll: true
description: "This report contains..."
description: |
This is
a multiline
string
description: >
This is
a multiline
string
items: [ 1, 2, 3, 4, 5 ]
names: [ "one", "two", "three" ]
names:
- "one"
- "two"
- "three"
items:
- things:
thing1: huey
things2: dewey
thing3: louie
- other things:
key: value
---
title: "Iris report"
author: "John Doe"
date: "4-Mar-2023"
format:
html:
toc: true
number-sections: true
execute:
echo: false
warning: false
---
## Iris
Let's explore the **iris** dataset.
### Table
```{r}
#| echo: true
iris[1:3,]
```
### Plot
```{r}
#| label: fig-hist-sepal
#| fig-cap: "Distribution of Sepal lengths."
#| fig-height: 3
hist(iris$Sepal.Length)
```
title: Report
subtitle: Topic
date: today
author: "John Doe"
format:
html:
toc: true
toc-depth: 3
number-sections: true
code-fold: true
df-print: paged
execute:
eval: true
echo: false
warning: false
message: false
freeze: true
Human readable markup
### Heading 3
#### Heading 4
*italic text*
**bold text**
`code text`
~~strikethrough~~
2^10^
2~10~
$2^{10}$
$2_{10}$
italic text
bold text
code text
strikethrough
210
210
\(2^{10}\)
\(2_{10}\)
$\sum\limits_{n=1}^{10} \frac{3}{2}\cdot n$
- bullet point
Link to [this](somewhere.com)

{width="50%"}
Today’s date is `r date()`
Today’s date is Mon Jun 10 07:34:32 2024
eval: false to not evaluate a code chunkecho: false to hide input codeoutput: true to show output, asis to skip stylingwarning: false hides warninsmessage: false hides messageserror: true shows error message and continues code executioninclude: false supresses all outputquarto::quarto_preview("report.qmd")quarto preview report.qmdquarto::quarto_render("report.qmd")quarto render report.qmdquarto render index.qmd
flowchart LR input-md(YAML + Markdown\n.md) --> engine-md([MARKDOWN engine]) --> markdown(Markdown\n.md) input-qmd(YAML + Markdown + Code\n.qmd, .rmd) --> engine-knitr-a([KNITR engine\nR, Python, Julia, Bash]) --> markdown input-jupyter(JupyterLab\n.ipynb) --> engine-jupyter([JUPYTER engine\nPython]) --> markdown input-rnw(YAML + Markdown + Code\n.qmd, .rnw) --> engine-knitr-b([KNITR engine\nR, Python, Julia, Bash]) --> tex(Tex\n .tex) markdown --> render([RENDER\nPandoc Lua]) tex --> render render --> output-md(Markdown\nGFM, Docusaurus) render --> output-html(Reports, Websites, RevealJS slides, Blogs, Manuscripts ...\n.html) render --> output-pdf(PDF, Beamer slides\n.pdf) render --> output-docx(Word\n.docx) render --> output-pptx(Powerpoint\n.pptx) render --> output-wikis(Wikis) output-html --> publish([PUBLISH]) --> hosting(Github pages\n Quarto pub\n Netlify) publish --> confluence(Confluence)
---
title: "My Document"
params:
alpha: 0.1
ratio: 0.1
---
quarto render document.qmd -P alpha:0.2 -P ratio:0.3
For more parameter options, see here
_quarto.ymlproject:
output-dir: _output
toc: true
number-sections: true
format:
html:
css: styles.css
pdf:
documentclass: report
margin-left: 30mm
_metadata.ymlformat:
revealjs:
menu: false
progress: false
search: false
quarto renderInteractive documentation
Quarto supports OJS for interactive visualizations in the browser
ojsdata = transpose(ojsd)
viewof x = Inputs.select(Object.keys(ojsdata[0]), {value: "sepal_length", multiple: false, label: "X axis"})
viewof y = Inputs.select(Object.keys(ojsdata[0]), {value: "sepal_width", multiple: false, label: "Y axis"})
Plot.plot({
marks: [
Plot.dot(ojsdata, {
x: x, y: y, fill: "species",
title: (d) => `${d.species} \n Petal length: ${d.petal_length} \n Sepal length: ${d.sepal_length}`})
],
grid: true
})Quarto supports directly publishing to several popular services
quarto publish quarto-pub_publish.yml stores information- source: project
quarto-pub:
- id: "5f3abafe-68f9-4c1d-835b-9d668b892001"
url: "https://njones.quarto.pub/blog"
Publishing documentation
> quarto --help
Commands:
render - Render files or projects to various document types.
preview - Render and preview a document or website project.
serve - Serve a Shiny interactive document.
create - Create a Quarto project or extension
create-project - Create a project for rendering multiple documents
convert - Convert documents to alternate representations.
pandoc - Run the version of Pandoc embedded within Quarto.
run - Run a TypeScript, R, Python, or Lua script.
add - Add an extension to this folder or project
install - Installs an extension or global dependency.
publish - Publish a document or project. Available providers include:
check - Verify correct functioning of Quarto installation.
help - Show this help or the help of a sub-command.
> quarto --version
1.4.549

Getting to know Quarto, Julia Müller, R-Ladies Freiburg 2022
Welcome to Quarto, Tom Mock, Posit Meetup 2023
_
platform x86_64-pc-linux-gnu
os linux-gnu
major 4
minor 3.2
2024 • SciLifeLab • NBIS • RaukR
toc_depth becomes toc-depthnumber_sections becomes number-sectionscode_folding becomes code-fold#| echo: false rather than r{echo=FALSE}::: notation| Rmd | Quarto |
|---|---|
| html_document | html |
| pdf_document | |
| word_document | docx |
| beamer_presentation | beamer |
| powerpoint_presentation | pptx |
| revealjs | revealjs |
| xaringan | |
| distill/tufte | quarto article layout |
| html_document2 | quarto crossref |
| pdf_document2 | quarto crossref |
| word_document2 | quarto crossref |
| blogdown/distill | quarto website/quarto blog |
| bookdown | quarto books |
| shiny documents | quarto interactive documents |
| pagedown | |
| rticles | |
| flexdashboard |