GVPT Maths Camp

Data Communication

Learning objectives

  1. Learn how to combine your code, results, and prose in one document

  2. Be introduced to markdown

Quarto

Source: Quarto

Markdown

A simple and easy-to-use markup language you can use to format your document


## Markdown

*A simple and easy-to-use markup language you can use to format your document*

Create your first Quarto document

Create your first Quarto document

YAML

Rendering your document

Writing prose in Quarto

You will need to know some markdown!


https://www.markdowntutorial.com/

Running code in Quarto

Code chunks start with ```{r} and ends with ```:

#| echo: true

library(tidyverse)

Code chunks

You can control how these code chunks render and are displayed using code chunks:

#| echo: true
#| warning: false

library(tidyverse)

Code chunks

Source: Quarto

Code chunks

You can set default chunk options in the YAML:

execute:
  echo: true
  message: false
  warning: false

In-line code

You will often want to reference numbers or results in your prose:


You include R code directly in your prose using the expression: `r`. For example:

Renders:

There are 234 observations in our data.

HOMEWORK

Reminder

In the final session, you will apply the skills you will learn over the next few days to a problem that interests you. To prepare for this, you need to find a data set that:

  1. Is relevant to your research interests,

  2. Contains continuous and discrete variables.

HOMEWORK

In case you are having some trouble: