[英]Is there a clever way to get two column spanner labels in an R GT table?
[英]R - gt package - Ability to control cell padding within table header and column labels?
問題
gt package 允許在tab_options()中傳遞一些單元格填充參數。 例如, data_row.padding和footnotes.padding 。 但是,沒有可用的參數會影響表格 header或 gt 表格的列標簽部分。
問題
有什么方法可以控制表格 header或 gt 表格的列標簽部分中的單元格填充?
用於演示的帶有大量單元格填充的可重現示例:
gt_tbl <- gt(data = mtcars) %>%
tab_header(
title = "mtcars dataset") %>%
tab_options(data_row.padding = px(35))
gt_tbl
tab_options() 中有 arguments 用於處理請求元素的填充。
gt(data = mtcars) %>%
tab_header(
title = "mtcars dataset") %>%
tab_options(data_row.padding = px(35),
column_labels.padding = px(35),
heading.padding = px(35))
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.