quarto

Overview

Quarto is an open-source document format and computational notebook system that combines the power of Markdown, code execution, and reproducible research. It allows users to seamlessly integrate code, text, and visualizations within a single document, fostering a dynamic and interactive narrative. Quarto supports multiple programming languages, including R, Python, Julia, and JavaScript, enabling cross-language interoperability. With its intuitive syntax, Quarto makes it easy to create professional-quality reports, presentations, and articles, where code chunks can be executed on-demand and their outputs automatically updated.

Slides

Open the slides in a new tab here.

Exercises

  1. In your R project, create a quarto document. Choose html output for now.
  2. Render the document using the Render button at the top of the RStudio pane.
  3. Change to format: docx in the header and re-render.
  4. Change back to format: html (I find easier to work on this way, can render to Word at the end).
  5. Create a code chunk with the following code and render:
nlsy <- read.csv(here::here("data", "nlsy.csv"))
head(nlsy)
  H0012400 H0012500 H0022300 H0022500 R0000100 R0009100 R0173600 R0214700
1       -4       -4       -4       -4        1        1        5        3
2        0        1        4        3        2        8        5        3
3        0        1        5        7        3        3        5        3
4       -4       -4        9        9        4        3        5        3
5       -4       -4       -4       -4        5        1        1        3
6        1        2        6        7        6        1        1        3
  R0214800 R0216400 R0217900 R0402800 R7090700 T4120500
1        2        1    30000       -5       -5       -5
2        2        1    20000       -4       11       34
3        2        1    22390       11       11       19
4        2        1    22390       -5       -5       -5
5        1        1    36000        3       -5       -5
6        1        1    35000        3       11       30

Resources

Additional resources for R Markdown will have a lot of overlap: