forked from MattesGrundmann/Addiction-Research
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo_repo.qmd
56 lines (35 loc) · 1.03 KB
/
demo_repo.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
---
title: "Example Quarto Document"
format: html
editor: visual
---
## Quarto
Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see <https://quarto.org>.
## Running Code
When you click the **Render** button a document will be generated that includes both content and the output of embedded code. You can embed code like this:
```{r}
1 + 1
```
You can add options to executable code like this
```{r}
#| echo: false
2 * 2
```
The `echo: false` option disables the printing of code (only output is displayed).
## Include figures
You can also include some figures, for example
![](figures/logo.png){width=50%}
## Load data
You can load data using relative paths. Here we load data from the subdirectory `data`
```{r}
load("data/experiment_data_counterfactual.rda")
head(df)
```
## Load R code
```{r}
# Load the R code in the file `R/my_function.R"
source("R/my_function.R")
set.seed(1234)
x <- draw(10)
print(x)
```