border - 如何在 r 中使用 gt 调整 column_labels 边框?
问题描述
我正在尝试用 gt() 制作一张桌子。只要我将 column_label.border.top/bottom.width 设置为 4(或更高) gt 就可以正常工作:
library(gt)
tab_1 <- exibble %>%
select(-c(fctr, date, time, datetime)) %>%
gt(
rowname_col = "row",
groupname_col = "group") %>%
tab_header(
title = md("Data listing from **exibble**"),
subtitle = md("`exibble` is an R dataset")) %>%
tab_options(
table.border.top.width = 0,
table.border.bottom.width = 0,
column_labels.border.top.width = 4,
column_labels.border.bottom.width = 8,
column_labels.border.top.color = "blue",
column_labels.border.bottom.color = "green")
tab_1
但是,一旦我做了完全相同的操作,但将 column_labels.border.top/bottom.width 设置为较低的值(例如 1),它就会恢复为默认宽度并且颜色会消失。
tab_2 <- exibble %>%
select(-c(fctr, date, time, datetime)) %>%
gt(
rowname_col = "row",
groupname_col = "group") %>%
tab_header(
title = md("Data listing from **exibble**"),
subtitle = md("`exibble` is an R dataset")) %>%
tab_options(
table.border.top.width = 0,
table.border.bottom.width = 0,
column_labels.border.top.width = 1,
column_labels.border.bottom.width = 1,
column_labels.border.top.color = "blue",
column_labels.border.bottom.color = "green")
tab_2
我究竟做错了什么?
解决方案
推荐阅读
- spring-boot - 如何在 Spring Boot 中将 Tomcat 绑定到域和端口
- mongodb - 如何获取上下文服务mongodb图集
- c# - Razor 类库图像显示在登录页面上,但未显示在任何其他页面上
- ruby - 在 Window 上的 VS Code 上找不到 Bash 命令
- css - 暗模式切换 - 两个按钮 - 只有一个有效
- python - 使用 for 循环和列表推导比较列表
- wordpress - WordPress 根目录 favicon 文件访问
- python - 我可以使用什么正则表达式来提取被特定字符包围的单词?
- android - 如何解决 Flutter RenderConstrainedBox 对象在布局期间被赋予无限大小
- google-workspace-add-ons - Gmail 插件:执行插件时出现问题