Quarto [Optional Read]
Quarto
Quarto is a scientific publishing tool that allows R, Python, Julia and Observable JS users to create dynamic documents, websites, books and more. In fact, the whole course website is created using Quarto. In case you downloaded RStudio for this course, you do not need to install Quarto anymore. If you have an older RStudio version, you might have to download an install it or update to a new RStudio version. If you are familiar with Markdown
or even RMarkdown
you will see a lot of similarities.
You can explore Quarto’s documentation to learn more about creating documents, websites, blogs, books, slides, etc.
Each page of your website is created by a q-Markdown file (.qmd
). All website pages are plain text file that have the extension .qmd. Notice that the file contains three types of content:
An (optional) YAML header surrounded by - - - at the top (there is no need in the beginning to alter it)
In the code chunks, you can set different options with #|
:
#| eval: false
prevents running the code and include its results#| include: false
prevents code and results from appearing in the finished file. Quarto still runs the code in the chunk, and the results can be used by other chunks#| echo: false
prevents code, but not the results from appearing in the finished file. This is a useful way to embed figures.#| message: false
prevents messages that are generated by code from appearing in the finished file.#| warning: false
prevents warnings that are generated by code from appearing in the finished.#| fig-cap
: “…” adds a caption to graphical results.
See the Quarto Cheat Sheet or the official quarto documentation for further information regarding the markdown syntax. It is necessary, that your code is formatted correctly to be evaluated.