Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
eeholmes committed Nov 18, 2024
2 parents fe743f6 + a82179a commit 170af4f
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 5 deletions.
2 changes: 2 additions & 0 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ website:
href: tutorials/tutorial-1.qmd
- text: Working with Quarto Files and the Markdown Language
href: tutorials/tutorial-2.qmd
- text: 'Dynamic output in Quarto files: Code, Tables, and Figures'
href: tutorials/tutorial-3.qmd
- text: <img width=100px>
- text: <img src="/images/noaa_emblem_logo-2022.png" width=100px>
href: https://fisheries.noaa.gov
Expand Down
2 changes: 1 addition & 1 deletion tutorials/tutorial-2.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ title: Working with Quarto Files and the Markdown Language
The Carpentries tutorials we are using will require you to "fork" the GitHub repository that contains the course material for future sessions. This will put a copy of the repository in your GitHub that will allow you to make commits without changing the original repository. To make things go smoothly in future sessions, make sure you set up your forked repository in RStudio. Instructions below and here a [video](https://youtu.be/XOGbyOH0xOs) showing Eli forking the repository.

1. To fork the repository, go to the following link: <https://github.com/UCSBCarpentry/Quarto-Project-Example/fork>\
This should take you to a screen that looks something like the attached screenshot. Keep everything the way it is and click the "Create Fork" button in the bottom right-hand corner of the page. Once <https://carpentries-incubator.github.io/reproducible-publications-quarto/02-quarto/03-quarto-documents/index.html>the repository finishes setting up, it will open with the forked copy on your GitHub.\
This should take you to a screen that looks something like the attached screenshot. Keep everything the way it is and click the "Create Fork" button in the bottom right-hand corner of the page. Once the repository finishes setting up, it will open with the forked copy on your GitHub.\
![](images/paste-1.png)

2. After forking the repository, click the green Code button in the center-right of the repository window. This will bring down a dropdown menu with the link to the forked repository. Copy the link using the icon with the two squares on the right.
Expand Down
28 changes: 24 additions & 4 deletions tutorials/tutorial-3.qmd
Original file line number Diff line number Diff line change
@@ -1,9 +1,29 @@
---
title: 'Dynamic output in Quarto files Code, Tables, and Figures'
title: 'Dynamic output in Quarto files: Code, Tables, and Figures'
---

::: {.callout-note title="Learning Objectives"}
1. Coming Soon!
1. Learn about rendering engines and how they work
2. Understand the structure and format of a code chunk
3. Learn how to insert dynamic variables into a Quarto document
4. Create formatted tables and figures using Quarto code chunks
:::

##
:::
## Today's Carpentries Tutorials

During these workshops, we will be using the Carpentries Incubator Reproducible Publications with RStudio set of tutorials from UCSB (<https://carpentries-incubator.github.io/reproducible-publications-quarto/>) for most of our content. While we will be walking everyone through the tutorials, it may be helpful for you to look through the tutorials prior to attending. This will give you a feel for what we will be covering during each session, and will highlight some areas where you may need some additional work or assistance.

For this session, we will be covering the following topics:

1. <https://carpentries-incubator.github.io/reproducible-publications-quarto/02-quarto/05-code-qmd/index.html>
2. <https://carpentries-incubator.github.io/reproducible-publications-quarto/02-quarto/06-rendering-code-yaml/index.html>

For this week's tutorials, we will be relying on the forked repository from the previous week. If you have not yet set up your forked repository in RStudio, follow the instructions here: <https://nmfs-opensci.github.io/Quarto-Workshop-2024/tutorials/tutorial-2.html#instructions-for-forking-the-carpentries-example-repository>

## More practice with Code Chunks

The Carpentries tutorials provide a good introduction to code chunks, but you may want some more practice. The [Quarto workshop](https://posit-conf-2024.github.io/quarto-intro/) from [posit::conf(2024)](https://posit.co/conference/) slide deck includes some extra examples for integrating dynamic code into Quarto documents: <https://posit-conf-2024.github.io/quarto-intro/materials/1-single-docs/1-welcome-to-quarto/slides.html#/code-cells>

We will walk through some of the features discussed in this slide deck, but feel free to click through on your own for some additional practice.

Code chunk options let you control the output of a code chunk in a YAML-like header at the beginning of the chunk. We will go over a few of these options in this week's sessions, but there are many more options available than what we will cover. Use [this reference guide](https://quarto.org/docs/reference/cells/cells-knitr.html) for the options available in an R code chunk.

0 comments on commit 170af4f

Please sign in to comment.