Resbaz 2025 - Authoring Collaborative Research Projects In Quarto

Author
Affiliation

Nick Young

University of Auckland

Published

July 3, 2025

YAML exercise
  • Fill the title: and name: and affiliation: fieds.

    • a couple of handy entries are already completed

    • the existing field: date: today will automatically generate today’s date (cool huh? ͡▀̿ ̿ ͜ʖ ͡▀̿ ̿ )

  • Add a table of contents following the guide

  • Render the document

  • Give me a ✔️ when done or a if you need help

Introduction

This is a sub-heading

  • a list?
  • what
  • I dunno

\(e=mc^2\)

\[ SD = \sqrt{\frac{\sum_{i=1}^{n}{(x_i - \bar{x})^2}}{n-1}} \]

Chamberlin (1897) Perkel (2022)

Markdown exercise

Libraries

Generally it is good practice to include a list of packages you use up front. But you may not need to show them in the output or list them in the table of contents. The {.unnumbered .unlisted} commands following the heading remove this section from the table of contents but it will remain in the text. Quarto accepts multiple coding languages, the following example uses R. I have set up working R code chunks so that for this tutorial you do not need to be familiar with R. Here, we will experiment with a few code execution options.

If you want to use Python code check out the documentation here.

Code block exercise
  • Check out the Block options and edit (and add to) the existing code block options below to:

  • exclude the results, messages and warnings

  • exclude the code from the HTML output (make sure it still evaluates!)

  • render the document and hit the ✔️ in zoom

if (!require("pacman")) install.packages("pacman", repos="http://cran.r-project.org")
Loading required package: pacman
pacman::p_load(ggplot2, palmerpenguins)    # Install & load packages
data(penguins)
head(penguins)
# A tibble: 6 × 8
  species island    bill_length_mm bill_depth_mm flipper_length_mm body_mass_g
  <fct>   <fct>              <dbl>         <dbl>             <int>       <int>
1 Adelie  Torgersen           39.1          18.7               181        3750
2 Adelie  Torgersen           39.5          17.4               186        3800
3 Adelie  Torgersen           40.3          18                 195        3250
4 Adelie  Torgersen           NA            NA                  NA          NA
5 Adelie  Torgersen           36.7          19.3               193        3450
6 Adelie  Torgersen           39.3          20.6               190        3650
# ℹ 2 more variables: sex <fct>, year <int>

Tabsets

Tabset exercise
  • Check out the tabset panel documentation

  • Create a tabset with three tabs in the template under the Tabsets heading

    • Does not matter what they contain but feel free to blurb something in there
  • render the document and hit the ✔️ in zoom

data(penguins)
head(penguins)
# A tibble: 6 × 8
  species island    bill_length_mm bill_depth_mm flipper_length_mm body_mass_g
  <fct>   <fct>              <dbl>         <dbl>             <int>       <int>
1 Adelie  Torgersen           39.1          18.7               181        3750
2 Adelie  Torgersen           39.5          17.4               186        3800
3 Adelie  Torgersen           40.3          18                 195        3250
4 Adelie  Torgersen           NA            NA                  NA          NA
5 Adelie  Torgersen           36.7          19.3               193        3450
6 Adelie  Torgersen           39.3          20.6               190        3650
# ℹ 2 more variables: sex <fct>, year <int>

fix

Images

Images exercise
  • There is a (royalty free) XKCD comic inside the images directory in the repo. Check out the guide, and insert the image into one of the tabsets you just created.

  • render the document and hit the ✔️ in zoom

let’g go Git it

You’re now ready to host your first live link!

GitHub
  • Render your project so that most recent changes are exported

  • In the source control on the left commit and push your changes

    • You can do this however you prefer, commandline, GUI, source control…
  • Head over to GitHub in your browser and go:

    • Settings -> GitHub pages -> enable github pages
  • By default, your link will be hosted at: https://githubusername.github.io/reponame/pathtodocument.html

    • The repo can remain private but anyone who has the link can view it.
  • Find your hosted template link and share with the world!

References

References are generated by default so include a final empty heading (delete this text) called References or Bibliography, or whatever is appropriate.

Chamberlin, T. C. 1897. “The Method of Multiple Working Hypotheses.” The Journal of Geology 5: 837–48.
Perkel, Jeffrey M. 2022. “Cut the Tyranny of Copy-and-Paste with These Coding Tools.” Nature 603 (7899): 191–92. https://doi.org/10.1038/d41586-022-00563-z.