Introduction to quantitative methods with

Chapter 6: Introduction to reproducible publications with quarto

Introduction

Note

  • Exercises associated with this chapter here

Challenges

  • Produce reproducible studies by integrating code and text in the same document
  • The complete generation of the study is contained in a single project
  • Limit the risk of errors due to manual actions
  • Native management of different formats for the final document (pdf, html, odt, etc.)

R Markdown

  • R Markdown is an R package that allows linking
    • Text in Markdown format
    • Code in R that can be executed and whose outputs can be integrated into the text
  • Separation of content and form of the document
  • A document is compiled in two steps
    • knit: the knitr package transforms the text and R outputs into a standard Markdown document
    • convert: the pandoc software transforms the .md document into a standard output format (html, pdf, etc.)

Quarto

  • Quarto is the successor to R Markdown
  • Quarto supports different computation engines (knitr, Jupyter, Observable…) which makes it natively multi-language (R, Python, JavaScript…)
  • The functioning of both systems remains very similar

Anatomy of a reproducible document

Additional resources