gtsummary 中的 CDC 脚注符号(将脚注数字符号调整为 gtsummary 对象中的其他符号)

问题描述 投票:0回答:1

我无法从 gtsummary 找到任何有关从标准数字格式更改脚注符号的资源。

我敢说这个问题不需要代码?

trial %>%tbl_summary

我使用了 flextable 中的 set_caption 作为解决方法,但它太麻烦了。

CDC 脚注符号:

脚注

按所示顺序使用以下符号来表示脚注:

*、†、‡、§、¶、#。如果表格需要超过 6 个脚注,请使用双符号(例如 **、††)。脚注符号和脚注之间不使用空格。在每个脚注末尾放置一个句号。

我也不介意在没有辅助函数的情况下手动转换符号,只是不完全确定它们存储在 gtsummary 对象中的位置。

谢谢

rstudio gtsummary flextable
1个回答
0
投票

对于标记,您可以使用

gt::opt_footnote_marks
:

gt::opt_footnote_spec
提供格式化选项。)

library(gtsummary)

trial %>% 
  tbl_summary() %>%
  as_gt() %>%
  # gt::opt_footnote_marks(marks = "extended")
  gt::opt_footnote_marks(marks = c("*", "†", "‡", "§", "¶", "#"))

创建于 2024-05-02,使用 reprex v2.1.0 enter image description here

创建于 2024-05-02,使用 reprex v2.1.0

© www.soinside.com 2019 - 2024. All rights reserved.