![](/img/trans.png)
[英]Table captions underneath tables if using gtsummary + flextable in officedown
[英]Rmarkdown/knitr captions for tables using {gtsummary}
將標題添加到 Rmarkdown 文檔中的gtsummary
表的最佳選擇或建議的工作流程是什么?
例如,我知道有一個用於kable
表的函數,所以理論上可以使用gtsummary::as_kable()
將一個轉換為另一個,但不知何故這感覺不是最佳的。 建議?
謝謝!
gt 包具有許多用於控制 gt 表打印方式的函數。 我建議您使用as_gt()
函數將 gtsummary 對象轉換為 gt,然后繼續使用 gt 函數進行自定義。 https://gt.rstudio.com/下面包含小例子。
library(gtsummary)
mod <- glm(response ~ age + grade, trial, family = binomial)
tbl_regression(mod, exponentiate = TRUE) %>%
as_gt() %>%
gt::tab_header("Table 1. Very Informative Model",
subtitle = "Highly Confidential")
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.