Day 02
Carleton College
Stat 220 - Spring 2026
hw01 repo and create an R project# to add descriptive section headers for each section/code chunk)github.com and confirm you can see your changesHelp! I don’t have a hw01 repo
Oops! I gave you the wrong set of data.
Karl – this is very interesting , however you used an old version of the data (n=143 rather than n=226). I’m really sorry you did all that work on the incomplete dataset.
Bruce
Short Term Impact
Long Term Impact

Scriptability \(\rightarrow\) R
Code environment \(\rightarrow\) RStudio
Literate programming (code, narrative, output in one place) \(\rightarrow\) Quarto
Version control \(\rightarrow\) Git / GitHub
An authoring framework for data science.
A document format (.qmd).
A software package
A file format for making dynamic documents with R.
A tool for integrating prose, code, and results.
A computational document.
What’s in .qmd:
```
test_function(20)
```
How it looks in rendered file:
What’s in .qmd:
```
#| message: false
test_function(20)
```
How it looks in rendered file:
What’s in .qmd:
```
#| warning: false
test_function(20)
```
How it looks in rendered file:
What’s in .qmd:
```
#| echo: false
test_function(20)
```
How it looks in rendered file:
[1] 20
This is a message.
Warning in test_function(20): This is a warning!
Sometimes, you’ll want to set every chunk option at once. You can do so in the YAML header using execute:
There’s an example HTML report on the schedule - UN report to replicate
Your task is to reproduce it in 02-example-unvotes.qmd
To be as reproducible as possible, you’ll need to use:
You will also recreate the visualization at the bottom, but pick new countries that interest you.
Where do I find 02-example-unvotes.qmd?
You can find 02-example-unvotes.qmd on the schedule for today

For example, instead of typing 857878 you would include nrow(unvotes) as an inline code chunk. Make sure the report knits and you get the right values.