Source Notes

Testing Source Note output

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

gt::gtsave(gt_table, filename = "outputs/pdf/source_notes_gt_pdf.pdf")

Preview the Output

rmarkdown rendered PDF

gt_table

Preview the Output

gt_save rendered word file

gt::gtsave(gt_table, filename = "outputs/docx/source_notes_gt_word.docx")

Preview the Output

quarto rendered word file

gt_table

Preview the Output

rmarkdown rendered word file

gt_table

Preview the Output