---
title: "Lab 1: Introduction to Quarto"
author: "Your name here!"
format: html
editor: source
embed-resources: true
---

# Exploring Quarto Documents

## Specifying Global Execute Options

Execution options specify how the R code in your Quarto document should be
displayed. This [guide](https://quarto.org/docs/computations/execution-options.html)
provides descriptions on the options you can specify in a document's execution.

**Question 1** -- Add your name and the date to the YAML. 

**Question 2** -- Add an `execute` line to your YAML that includes the following
options, (1) your source code is always output on the page, and (2) your
document will render even if there are errors.

## Running the Provided Code

```{r}
#| echo: true
#| label: practicing-running-code

1 + 1
```

**Question 3** -- Let's spice this code up a bit. Delete `1 + 1` from the code
chunk and paste in the code provided in the Lab 1 instructions. 

## Check the Data Documentation

**Question 4** -- In your **console** (*not* in the Quarto document), type
`?ToothGrowth` (or alternatively `help(ToothGrowth)`. Use the information that
pops up in the *Help* pane in RStudio to fill in the blanks below. 

*This dataset investigates the effect of _____ on tooth growth in ____.*

*The two supplement delivery methods include OJ (____) and VC (____).*

*`ToothGrowth` is a data frame with ___observations and ____ variables.*

**Question 5** -- *Before* the code chunk, change the "Running the Provided
Code" section header to a header that better describes the contents of this
section (e.g., Tooth Growth Dataset).

## Creating a Plot

**Question 6** -- Replace the `plot(pressure)` code with the code provided in the Lab 1 instructions.

```{r}
#| echo: true
#| label: creating-a-plot

plot(pressure)
```

Now, run this code chunk! You should see two side-by-side boxplots, one plot
comparing tooth length between the two supplement delivery methods and one plot
comparing tooth length between the three different dosages uses. 

**Question 7** -- Read over the [Quarto documentation on figure options](https://quarto.org/docs/authoring/figures.html#computations)
and add an option (`#|`) to the above code chunk to make the figures print
side-by-side (i.e., in one row) in the rendered HTML file. 

**Question 8** -- Specify in the code chunk options that these boxplots 
should be **center aligned** (also found in the Quarto documentation).

**Question 9** -- Specify a **figure caption** for the boxplots (using a
code-chunk option). This is a bit tricky! There are two plots, so you will need
to figure out how to specify a different caption for each plot. 

