-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
05_source_notes.qmd
68 lines (46 loc) · 1.33 KB
/
05_source_notes.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
---
title: "Source Notes"
format: html
editor: visual
---
## Testing Source Note output
```{r}
library(gtsummary)
tbl <- gtsummary::tbl_summary(gtsummary::trial, by = trt, include = c(age, grade), missing = "always", label = list(age = "Age")) |> add_overall()
gt_table <- tbl$table_body |>
gt::gt(caption = gt::md("This is the caption")) |>
#source notes
gt::tab_source_note("This is Source Note 1") |>
gt::tab_source_note("This is Source Note 2") |>
gt::tab_source_note("Abbreviations: Q1 = First Quartile; Q3 = Third Quartile")
```
### gt_save PDF
```{r eval = FALSE}
gt::gtsave(gt_table, filename = "outputs/pdf/source_notes_gt_pdf.pdf")
```
[Preview the Output](outputs/pdf/footnotes_gt_pdf.pdf)
-no issues
### rmarkdown rendered PDF
```{r eval = FALSE}
gt_table
```
[Preview the Output](outputs/pdf/source_notes_rmd_pdf.pdf)
- no issues
### gt_save rendered word file
```{r eval = FALSE}
gt::gtsave(gt_table, filename = "outputs/docx/source_notes_gt_word.docx")
```
[Preview the Output](outputs/docx/source_notes_gt_word.docx)
- no issues
### quarto rendered word file
```{r eval = FALSE}
gt_table
```
[Preview the Output](outputs/docx/source_notes_qmd_word.docx)
- no issues
### rmarkdown rendered word file
```{r eval = FALSE}
gt_table
```
[Preview the Output](outputs/docx/source_notes_rmd_word.docx)
- no issues