Skip to main content

Section 10.8 Key Takeaways

  • Quarto allows you to combine code, narrative text, and output in a single document, making analyses easier to understand, evaluate, share, and reproduce.
  • While a standalone R script can be reproducible, Quarto strengthens reproducibility by explicitly linking analytical decisions, results, and interpretation in one place.
  • Every Quarto document is built around three core components: YAML metadata, Markdown text, and R code chunks.
  • The YAML section controls document-level settings such as the title, author, date, output format, and optional features like themes and tables of contents.
  • Narrative text in Quarto is written using Markdown syntax, allowing you to structure and format reports without writing additional code.
  • All R code must be written inside R chunks, which are executed from top to bottom each time the document is rendered.
  • Naming R chunks clearly helps organize analyses, improves readability, and prevents rendering errors.
  • Any object, function, table, or plot that is called inside a chunk will automatically appear in the final output.
  • Tables and figures can be enhanced with captions and formatting to make results easier to interpret and reference.
  • Cross-referencing automates the connection between your narrative and your results; by using the @ symbol with proper prefixes (fig-, tbl-, or sec-), Quarto handles all numbering and hyperlinking for you, ensuring your document remains organized even as you add or move content.
  • Rendering a Quarto document runs the entire analysis in a clean session, helping expose missing packages, undefined objects, and hidden dependencies.
  • Publishing a Quarto document transforms an analysis into a polished, shareable artifact that can be viewed outside of R.
  • This chapter demonstrates how all earlier analytical skillsβ€”data wrangling, visualization, and modelingβ€”come together in a clear, reproducible final report.