Reproducible research with Quarto

BDSI workshop
Published

April 12, 2024

Welcome 👋

This is a training workshop for staff and students affiliated with the Australian National University (ANU) offered by the ANU Biological Data Science Institute (BDSI).

The goal of the workshop is to provide participants with the proficiency to author reproducible research documents using Quarto, an open-source system for scientific and technical publishing. Prior familiarity and usage of at least one of the programming languages such as Python, R, or Julia is assumed to get the most out of the workshop.

🎯 Learning objectives

Upon completion of this workshop, participants should be able to:

  • Generate HTML, PDF, or Word documents using Markdown syntax
  • Understand the anatomy of Quarto documents
  • Develop dynamic documents containing code (in R, Python, or Julia) using Quarto
  • Implement various code chunk options to customize chunk behaviour
  • Recognize the significance of reproducibility and grasp the concept of literate programming
  • Apply reproducible practices
  • Establish an organized folder structure for data projects

🔧 Preperation

Please ensure that you download and install

  • the latest version of Quarto,
  • bring your own dataset for technical report writing (note: the teaching team can’t help with the analysis or writing content – you are recommended to do the analysis and writing up the results before the workshop),
  • (Optional) make a free account at Quarto Pub, and
  • (Optional) Slack (alternatively you can use the web version).

For R users

  • It is assumed that you already have R installed.
  • Please install the latest version of RStudio Desktop,
  • And install the following R packages:
install.packages(c("tidyverse", "rmarkdown", "quarto", "tinytex"))
# then install tinytex
tinytex::install_tinytex()

For Python users

  • It is assumed that you already have Python installed.
  • Run the following command in the terminal:
quarto install tinytex
  • Please install Jupyter.
  • Optionally (but preferred), follow the same instruction as the R users and install the following R package:
install.packages("reticulate")

For Julia users

  • It is assumed that you already have Julia installed.
  • Run the following command in the terminal:
quarto install tinytex
  • Please install Jupyter.
  • Optionally (but preferred), follow the same instruction as the R users and install the following R package:
install.packages("JuliaCall")

For other language users

Other languages are possible as well (e.g. E-Views, SAS and Stata) but it may not work as seamlessly as above languages. Other languages that is supported via the knitr engine are listed below.

names(knitr::knit_engines$get())
 [1] "awk"       "bash"      "coffee"    "gawk"      "groovy"    "haskell"  
 [7] "lein"      "mysql"     "node"      "octave"    "perl"      "php"      
[13] "psql"      "Rscript"   "ruby"      "sas"       "scala"     "sed"      
[19] "sh"        "stata"     "zsh"       "asis"      "asy"       "block"    
[25] "block2"    "bslib"     "c"         "cat"       "cc"        "comment"  
[31] "css"       "ditaa"     "dot"       "embed"     "eviews"    "exec"     
[37] "fortran"   "fortran95" "go"        "highlight" "js"        "julia"    
[43] "python"    "R"         "Rcpp"      "sass"      "scss"      "sql"      
[49] "stan"      "targets"   "tikz"      "verbatim"  "ojs"       "mermaid"  

Issues

If you are having issues, see also here or talk to the teaching team.

Please note that the teaching team primarily consists of R users, so we may not be able to provide help for other languages.

Slack workspace (Optional)

We use Slack to facilitate communication between workshop participants and the teaching team.

  • You must use your ANU email to sign up.
  • Use your full name.
  • By joining, you agree to abide by this code of conduct.
  • Please don’t direct message the teaching team in Slack. Your questions are more likely to be answered in the Slack channels rather than in direct messages.

Please note that the teaching team does not necessarily actively monitor or attend to the Slack workspace outside of the workshop.

Teaching team

  • Academic statistician passionate about data science and open source software
  • Currently, Deputy Director of ANU Biological Data Science Institute and Executive Editor of R Journal
  • PhD in Statistical Bioinformatics
  • BSci (Adv Maths) with major in Mathematics and Statistics
  • Loves data and coding

        https://emitanaka.org     @statsgen     fosstodon.org/@emitanaka

  • 2nd year of PhD student at ANU, working on phylogenomics methods to study hybridisation
  • BSci in Bioinformatics
  • Enjoy hiking and science
  • jeremiasivan
  • (Almost finishing) PhD student @Moritz Lab, E&E Division, RSB, ANU
  • Working on historical biogeography of Indo-Australian birds
  • BSc (Hons) with major in Zoology and Ecology & Conservation
  • Loves games, art markets, and FOOD
  • @goaudreymp
  • https://linktr.ee/goaudreymp
  • 3rd Year PhD student @ Linde Lab, E&E Division, RSB, ANU
  • Investigating the evolution of the Australian orchid flora and associated funga
  • MScSt (Biodiversity Science)
  • Loves playing music, reading, nature
  • @rpodonnell
  • rpodonnell.github.io
  • 2nd Year PhD student @ Sequeira Lab, E&E Division, RSB, ANU
  • Identifying social, collective, or coordinated movement behaviour patterns in sharks using tracking data
  • MSc (Marine Biology), BSc (Biology)
  • Loves triathlon, hiking and the ocean
  • @nilskreuter
  • https://linktr.ee/nilskreuter

Materials

The materials can be found here.

These materials are shared under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

This website is brought to you by the ANU Biological Data Science Institute.