1.8 Formatting with Quarto

In this assignment, you will recreate a Quarto document that I’ve already compiled (workbook appendix). You can only see the compiled HTML version, and your task is to reverse-engineer the quarto file by adding the necessary formatting, text, math, and code chunks in your own document. This exercise will help you become familiar with using Quarto, which you’ll need throughout the course.

Getting Started:

  1. Open Rstudio and go to File > New File > Quarto Document.

  2. Add a title to the file and enter you and your groupmates’ names under Author.

  3. Keep the format at HTML and hit Create.

    Avoid the visual editor at all costs: make sure to toggle over to source and leave it there.

    You’ll also want to periodically save your document (Command S on Mac, Ctrl S on Windows) and compile it to HTML (hit Render) to see your progress.

Quarto Formatting Hints:

Text is formatted using markdown:

    | This | is   | a     | table |
    |------|------|-------|-------|
    | with | some | words | in    |
    | it.  |      |       |       |

Math is formatted using LaTeX:

\begin{align}
y &= mx + b \\
z &= x^2 + y^2
\end{align}

Here’s how to add R code, especially to draw a plot:

    ```{r}
ggplot() +
  stat_function(fun = function(x) 3 * x + 2, color = "red")
(3 / 2) * 2 ^ 2
[1] 6