在R中创建专业外观的Powerpoint [英] Creating Professional Looking Powerpoints in R

查看:108
本文介绍了在R中创建专业外观的Powerpoint的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有很好的方法来使用R中的数据以及像ReporteRs这样的包来生成完整的Powerpoint? 我要创建约900张幻灯片.我们的分析师目前遵循以下路径:

Is there a good way to use data from R and a package like ReporteRs to generate complete Powerpoints? I have about 900 slides to create. Our analysts currently follow this path:

DB-> SAS-> CSV-> PPTX(嵌入式图形)(x900次)

DB --> SAS --> CSV --> PPTX (embedded graphics) (x900 times)

这是手动操作,容易出错且运行缓慢.

This is manual, open to lots of errors and slow.

理想情况下,我希望:

DB-> R + ReporteRs-> PPTX(x1次)

DB --> R + ReporteRs --> PPTX (x1 time)

问题是2折.首先,我们的客户(无理)更喜欢PPTX而不是Web甚至PDF格式.其次,R图形无法在PPTX中进行编辑,有时大小/格式都不理想,尤其是在轴文本大小方面. 那么有没有一种方法可以使用R创建可编辑的Powerpoint图形,超链接的目录等?如果不是,那么至少有一组不错的ggplot2模板可以与不错的PPTX一起使用演示文稿格式?

The issue is 2-fold. First, our clients (unreasonably) prefer PPTX over a web or even PDF format. Second, R graphics cannot be edited in PPTX, and are sometimes not ideally sized/formatted, especially in terms of axis text sizes. So is there a way to use R to create editable Powerpoint graphics, hyperlinked tables of contents, etc? If not that, is there at least a good set of ggplot2 templates to use with decent PPTX presentation formatting?

推荐答案

您可以使用刚在CRAN上发布的我的新export程序包,以本机Office矢量格式轻松导出到Office(Word/Powerpoint),从而完全可编辑的图形,请参阅 https://cran.r-project.org/web/packages/export/index.html https://github.com/tomwenseleers/export

You can use my new export package that just came out on CRAN to easily export to Office (Word/Powerpoint) in native Office vector format, resulting in fully editable graphs, see https://cran.r-project.org/web/packages/export/index.html and https://github.com/tomwenseleers/export

例如:

install.packages("export")
library(export)

?graph2ppt
?graph2doc

library(ggplot2)
qplot(Sepal.Length, Petal.Length, data = iris, color = Species, 
      size = Petal.Width, alpha = I(0.7))
graph2ppt(file="ggplot2_plot.pptx", width=7, height=5) 
graph2doc(file="ggplot2_plot.docx", width=7, height=5) 

这篇关于在R中创建专业外观的Powerpoint的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆