[英]Is there any possibility to save kable table in .tex or .markdown?
[英]Print kable table to .tex file
我有一個在 kable 中生成的表,我想打印到一個 .tex 文件,就像我使用 print.xtable 一樣。
那是,
print(xtable(data.frame, xtable.options), print.options, file = filename.tex))
當我將打印添加到 kable 表生成時,它不起作用。 它似乎被忽略了。
我在用:
kable(df, format = 'latex', kable.options) %>% print(file = filename.tex)
請注意,pipe 運算符%>%
應將前面的內容放入以下 function 的第一個參數中。 我沒有看到 print.kable function 可用。 我還缺少其他一些 function 嗎?
我正在使用 kable 允許對列進行分組; 默認情況下 xtable 似乎不允許。
你可以使用cat
-
cat(kable(head(mtcars), format = 'latex'), file = 'file.tex')
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.