安装
install.packages("officer")
install.packages("rvg")
install.packages("openxlsx")
install.packages("ggplot2")
install.packages("flextable")
install.packages("xtable")
install.packages("rgl")
install.packages("stargazer")
install.packages("tikzDevice")
install.packages("xml2")
install.packages("broom")
install.packages("devtools")
library(devtools)
devtools::install_github("tomwenseleers/export")
使用
library(export)
?graph2ppt
p <- plot(cars, main = "cars")
p
graph2ppt(p, file = "test.pptx", width = 4, height = 4)
?graph2doc
?graph2svg
?graph2png
?table2ppt
?table2tex
?table2excel
?table2doc
?table2html
graph2ppt
导出PPT中所有元素可编辑
如果元素过多(比如火山图、热图)会很卡,建议先使用graph2png
保存为PNG再复制到PPT中
PPT编辑排版还是挺方便的,笑死
网友评论