Skip to content

Commit

Permalink
Merge pull request #1115 from ethanwhite/quarto-fixup
Browse files Browse the repository at this point in the history
Minor cleanup of quarto lecture
  • Loading branch information
ethanwhite authored Dec 3, 2024
2 parents 2427df0 + e27db2c commit a97e584
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion materials/quarto.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,15 @@ In this document I will:

* Quarto allows you to include code to run in the document
* Click on `+C` button, which stands for "add code"
* Or in the visual editor type `/` and select `R Code Chunk`

<pre><code>
## Required Packages

```{r}
library(dplyr)
library(ggplot2)
library(gt)
library(readr)
```
</code></pre>
Expand Down Expand Up @@ -148,8 +150,9 @@ ggplot(time_series, aes(x = year, y = count)) +

### Chunk options

* Each block of code is called a "chunk"
* Chunks have lots of useful options
* Can add them at the start of the chunk using `#| `, the option name, and then the option value
* Can add them at the start of the chunk using `#| `, the option name, `:`, the option value
* `#| echo: false` let's you show the results of the code chunk without showing the code.
* ADD: `#| echo: false` to plot chunk
* `#| message: false` will remove messages returned by R
Expand Down Expand Up @@ -191,8 +194,13 @@ time_series |>

* You can then reference the table in the text using `@tbl-total-count`

```r
The population dynamics at the site varies by species (@tbl-total-count).
```

### Citations


* `Insert` -> `Citation` -> `From DOI` -> `10.1101/332783` -> `+` -> `Insert`
* Creates a `bibliography.bib` file with the citations
* This is called a bibtex file
Expand Down

0 comments on commit a97e584

Please sign in to comment.