Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想使用 R 包并以粗体显示gt表格输出。看起来您可以在 gt 中使用降价语法,但这并不像我期望的那样工作。有小费吗?ONETWO
gt
ONE
TWO
dummy <- tibble( `**ONE**, N = 1` = 1, `**TWO**, N = 2` = 2 ) dummy %>% gt()
无论如何都看不到您想要做的事情,但这通过拥有一个列表来完成它,该列表将列名映射到带有格式的标签名称。
library(tibble) library(gt) dummy <- tibble( "one" = 1, "two" = 2 ) col_for_list <- list(one = md("**ONE**, N = 1"), two = md("**TWO**, N = 2")) dummy %>% gt::gt() %>% cols_label(.list = col_for_list)