Introduction - Quarto for R

Aya Mitani

Welcome

  • Welcome to Statistical Programming and Computation for Health Data
  • This is a pilot course – you are the first students taking this course!
  • Therefore I need LOTS of feedback
  • I plan to move this course to a permanent course after this term
  • Syllabus

Software and websites

  • R
  • RStudio
  • Quarto
  • Git
  • GitHub
    • Need to create a GitHub account

Course format

  • This course implements active learning

    • Most of the class time will be devoted to completing an in-class assignment after a brief introduction

    • You are encouraged to collaborate with your classmates while in class

  • Each week, there will be a pre-class assignment(s) and a short quiz (due Sundays 11:59pm)

    • You cannot consult your classmates on the quizzes
  • You will develop an R package for the final project

    • See syllabus for details

Quarto

  • Quarto is a publishing platform for technical and scientific documents

  • You can create documents (HTML, PDF, Word) where text and code coexist

  • Outputs include reports, presentations, websites, books, and more

  • You can include code written in R, Python, Julia, or Observable

  • These slides were created in Quarto

Text in Quarto

  • Quarto uses a Markdown format

  • Mathematical syntax and equations can be included in a similar manner to LaTex

\[ Y = \alpha + \beta X \]

Code chunks in Quarto

data(cars)
head(cars)
  speed dist
1     4    2
2     4   10
3     7    4
4     7   22
5     8   16
6     9   10
plot(cars$speed ~ cars$dist)

Quick exercise

In-class assignment

  • Available in Quercus

  • Work in pairs

Next week

  • Before class, read the assigned paper and do the quiz

  • Throughout the course, we will attempt to reproduce the analysis described in the paper

  • We will create an analytical data set from multiple open source data sets