-
Notifications
You must be signed in to change notification settings - Fork 45
/
template.qmd
134 lines (81 loc) · 4.16 KB
/
template.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
---
title: "Your awesome project title"
author:
name: "You et al"
affiliation: "From whence you hail"
date: today
bibliography: refs.bib
from: markdown+emoji
format:
html:
code-fold: false
link-external-newwindow: true
theme:
light: flatly
dark: darkly
---
:::{.callout-tip}
# YAML exercise
- Fill the `title: ` and `name: ` and `affiliation: ` fieds.
- a couple of handy entries are already completed
- the existing field: `date: today` will automatically generate today's date (cool huh? ͡▀̿ ̿ ͜ʖ ͡▀̿ ̿ )
- Add a table of contents following the [guide](https://quarto.org/docs/output-formats/html-basics.html)
- Remove this callout block and render the document
- Give me a :heavy_check_mark: when done or a :hand: if you need help
:::
# Introduction
:::{.callout-tip}
# Markdown exercise
- Check out [Quarto's markdown guide](https://quarto.org/docs/authoring/markdown-basics.html)
- and the [biostats guide to writing (equations section)](https://biostats-r.github.io/biostats/quarto/04-figures-tables.html#equations)
In the template Introduction section take 3-4 minutes to write:
- a sub-heading under the introduction
- a list
- and an equation (inline or as a block)
- cite one of the articles in in existing `.bib` file using the `@`
- remove this callout and render the document and hit the :heavy_check_mark: in zoom
:::
# Libraries {.unnumbered .unlisted}
Generally it is good practice to include a list of packages you use up front. But you may not need to show them in the output or list them in the table of contents. The `{.unnumbered .unlisted}` commands following the heading remove this section from the table of contents but it will remain in the text. Quarto accepts multiple coding languages, the following example uses R. I have set up working R code chunks so that for this tutorial you do not need to be familiar with R. Here, we will experiment with a few code [execution options](https://quarto.org/docs/computations/execution-options.html).
If you want to use Python code check out the documentation [here](https://quarto.org/docs/computations/python.html#overview).
:::{.callout-tip}
# Code block exercise
- Check out the [Block options](https://quarto.org/docs/computations/execution-options.html) and edit (and add to) the existing code block options below to:
- exclude the results, messages and warnings
- exclude the code from the HTML output (make sure it still evaluates!)
- render the document and hit the :heavy_check_mark: in zoom
:::
```{r Libraries}
#| include: true
if (!require("pacman")) install.packages("pacman", repos="http://cran.r-project.org")
pacman::p_load(ggplot2, palmerpenguins) # Install & load packages
```
# Tabsets
:::{.callout-tip}
# Tabset exercise
- Check out the [tabset panel documentation](https://quarto.org/docs/interactive/layout.html#tabset-panel)
- Create a tabset with three tabs in the template under the Tabsets heading
- Does not matter what they contain but feel free to blurb something in there
- render the document and hit the :heavy_check_mark: in zoom
:::
# Images
:::{.callout-tip}
# Images exercise
- There is a (royalty free) XKCD comic inside the images directory in the repo. [Check out the guide](https://quarto.org/docs/authoring/figures.html), and insert the image into one of the tabsets you just created.
- render the document and hit the :heavy_check_mark: in zoom
:::
# let'g go Git it
You're now ready to host your first live link!
:::{.callout-tip}
# GitHub
- Render your project so that most recent changes are exported
- In the source control on the left commit and push your changes
- You can do this however you prefer, commandline, GUI, source control...
- Head over to GitHub in your browser and go:
- Settings -> GitHub pages -> enable github pages
- By default, your link will be hosted at: https://githubusername.github.io/reponame/pathtodocument.html
- The repo can remain private but anyone who has the link can view it.
- Find your hosted template link and share with the world!
:::
# References
References are generated by default so include a final empty heading (delete this text) called References or Bibliography, or whatever is appropriate.