【发布时间】:2018-05-08 04:05:16
【问题描述】:
我已经按照链接的建议:R save FlexTable as html file in script,但似乎我面临一个不同的问题,因为这个解决方案对我不起作用。 vanilla.table () 函数生成除flextable () 函数之外的对象。
我正在使用flextable,因为它可以实现理想的格式化可能性
例子:
library(flextable)
library(rtable)
# The example below work.
myft <- vanilla.table(
head(mtcars) )
myft
writeLines(as.html(myft), "MyFlexTable.html")
# The example below does not work.
myft <- regulartable(
head(mtcars),
col_keys = c("am", "carb", "gear", "mpg", "drat" ))
myft
writeLines(as.html(myft), "MyFlexTable.html")
ps:我知道可以通过单击“导出>另存为图像”手动下载照片,但是我需要对其进行编程
提前致谢!
【问题讨论】: