【发布时间】:2015-06-24 23:57:58
【问题描述】:
使用ReporteRs 包,我们可以从 R 代码创建演示文稿。
我尝试创建一个具有居中标题的幻灯片。
这里是我用来创建幻灯片的基本代码:
library( ReporteRs )
mydoc = pptx( ) # try adding argument: template = 'template.pptx' here
mydoc = addSlide( mydoc, "Title and Content" )
mydoc = addTitle( mydoc, "This is a title" )
writeDoc( mydoc, "pp_simple_example.pptx" )
这将创建一个标题位于左侧的幻灯片。不幸的是addTitle 没有公开任何参数来格式化文本或改变它的位置。我还查看了包选项:
options()[grep('ReporteRs',names(options()))]
但没有成功。
【问题讨论】:
-
查看文档 (davidgohel.github.io/ReporteRs/powerpoint.html#UIDOGY85lT7OO),您似乎可以通过为其提供一个模板来完成此操作,该幻灯片模板具有您想要的已定义位置。
-
@BrandonBertelsen 谢谢。看起来很有趣。即使我没有看到是否有复制现有幻灯片或更新现有幻灯片的重复功能。
-
我在您的问题代码中添加了注释,我相信您可以在其中指定模板。
标签: r powerpoint reporters