gpt4 book ai didi

r - 如何使用knitr::kable在表的底部添加注释?

转载 作者:行者123 更新时间:2023-12-04 12:34:46 28 4
gpt4 key购买 nike

LaTeX具有使用tablenotes进行add notes to the bottom of a table的功能,因此kable似乎可以轻松实现此功能-也许它已经可以实现,但是我找不到关于此功能的任何提及。

例如:
Table notes at the bottom of a table

最佳答案

您实际上可以使用Hao Zhu的超赞kableExtra包来做到这一点!如下:

library(knitr)
library(kableExtra)
dt <- mtcars[1:5, 1:4]

# LaTeX Table
kable(dt, format = "latex", booktabs = T) %>%
kable_styling() %>%
add_footnote("Footnote 1", notation="alphabet")

enter image description here

Check out the GitHub repository for the full scope of everything kableExtra can do. It greatly extends the functionality of tables within both LaTeX and HTML with loads of extra features.

关于r - 如何使用knitr::kable在表的底部添加注释?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27933076/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com