[1] 2
Activity 1 due next week
Instructions are available at the top of the activity
For graduate students: identify 5 papers that are important to your dissertation, whose results you think it would be important to reproduce
For undergraduate students: identify 5 openly available datasets that you would like to explore in your project
Quarto files are designed to be used in three ways:
For communicating to decision-makers, who want to focus on the conclusions, not the code behind the analysis.
For collaborating with other data scientists (including future you!), who are interested in both your conclusions, and how you reached them (i.e. the code).
As an environment in which to do data science, as a modern-day lab notebook where you can capture not only what you did, but also what you were thinking.
— R for Data Science, Ch. 28
qmd
file(link to download this file)
Lines 1–5: “YAML” header - this is the space to add information about your file (title, author, date, additional details).
---
)key: value
formatLines 7–15: R
code chunk
```{r} {code} ```
)Lines 16–20: Text in Markdown
*
around a word to italicize: *quarto*
becomes quartoqmd
filesYAML
header of the fileQuarto as a “swiss army knife” for scientific writing
When preparing a manuscript for journal submission, there’s several moving pieces to manage:
Quarto can help with all!
Reference management/inserting citations
Reference management/inserting citations
“Old school” approach
references.bib
)references.bib
should be BibTex
entries (available online), e.g. @article{wickham2014tidy,
title={Tidy data},
author={Wickham, Hadley},
journal={Journal of statistical software},
volume={59},
pages={1--23},
year={2014}
}
Reference management/inserting citations
A modern alternative:
Inserting figures, tables, equations
Generating appendices/supplements
.qmd
files.{{< include appendix-1.qmd >}}
Sharing code with reviewers
Keeping track of your changes during peer-review
git
to keep track of your changes, you have a clear history of what lines you changed.diff
to identify exactly what changed between your initial submission and re-submission).Thursday exercises
https://carpentries-incubator.github.io/reproducible-publications-quarto/
R
code chunks*text in italics*
→ text in italics
**text in bold**
→ text in bold
***text in bold-italic***
→ text in bold-italic
[underlined text]{.underline}
→ underlined text
[text in small caps]{.smallcaps}
→ text in small caps
text with ^superscript^ or ~subscript~
→
text with superscript or subscript
$\frac{dN}{dt} = rN$
→ dNdt=rN
Community ecology is a mess [@lawton_1999]
→ Community ecology is a mess (Lawton 1999)
You can also add footnotes^[like this]
→ You can also add footnotes1

→
# Header 1
## Header 2
### Header 3
See https://quarto.org/docs/authoring/markdown-basics.html for a comprehensive guide to markdown options
R
Code in qmd
documents, we need to insert code “chunks”The keyboard shortcut Cmd + Option + I / Ctrl + Alt + I.
The “Insert” button icon in the editor toolbar.
By manually typing the chunk delimiters ```{r}
and ```
.
— R for Data Science, Ch. 28
R
chunks can be shown but not run (“evaluated”)R
code chunks can control the appearance of the outputR
code chunks can control the appearance of the outputR
code chunks can control the appearance of the output