[英]gtsummary - is there a way to put footnote at the very bottom without a row?
我对 R 有点陌生,正在修改 gtsummary 包来创建一个包含我的 MA 论文的描述性统计数据的表格。 我能够为我当前的目的创建一个。 但是我希望脚注没有专门的行(如图中圈出),而是在表格的底部,因为我所属的研究所的格式要求。 我搜索了很多,但找不到解决此问题的早期帖子。 有没有办法在 gtsummmary 中完成这个? 我也愿意接受可以执行此操作的替代(最好是对初学者友好的)软件包的建议。 这是代码和输出:
tbl <-
# iterate over these two statistics
c("{mean}","{sd}","{min}","{max}") %>%
# build tbl_summary using each of the stats
map(
~l2 %>%
select(AoA, Reading, Writing, Speaking, Listening, AVG_PROF ) %>%
tbl_summary(type = c(Reading = "continuous", Writing = "continuous", Speaking =
"continuous", Listening = "continuous"),
statistic = all_continuous() ~ .x, label = list(AVG_PROF ~ "Overall" , AoA ~ "AOA"),
missing = "no"
)
) %>%
# merge the two tables together
tbl_merge() %>%
modify_caption("**Table 1. Linguistic Background of the L2 participants**<br><br>") %>%
modify_spanning_header(everything() ~ NA) %>%
modify_footnote(everything() ~ NA) %>%
modify_header(list(stat_0_1 ~ "**Mean**", stat_0_2 ~ "**SD**", stat_0_3 ~ "**Min**", stat_0_4
~ "**Max**")) %>%
modify_caption("<div style='text-align: left'>Table 1. Linguistic Background of the L2
participants<br><br></div>") %>%
modify_table_styling(
columns = label,
label == "AOA",
footnote = "Age of Acquisition of English"
)
嗯,如果那是html
输出,那么我会考虑设置自定义css
,例如:
---
title: ""
author: ""
css: "mycss.css"
---
在mycss.css
文件中是这样的:
table.gt_table {
border-bottom-width: 0px;
}
删除底部边框。
在 pdf 输出中,脚注在longtable
下方
这与https://github.com/rstudio/gt/blob/master/R/utils_render_latex.R ~ 467 行一致,其中脚注包含在minipage
环境中。
作为一个供考虑的提案——你看过kableExtra吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.