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.
如何将 huxtable 保存到 LaTeX (.tex) 格式的文件中?我确实找到了将 LaTeX 表打印到控制台的代码:
library(huxtable) ht <- huxtable( a = 1:3, b = letters[1:3] ) print_latex(ht)
huxtable 包是否具有将表保存到磁盘的本机方式,还是我们需要一种解决方法?
可能还有其他方法,但使用capture.output作品 -
capture.output
library(huxtable) capture.output(print_latex(ht), file = 'output.tex')
huxtable 包有一个功能可以做到这一点:quick_latex(ht, file = "Table.tex", open = FALSE).
quick_latex(ht, file = "Table.tex", open = FALSE)