【发布时间】:2016-01-19 02:14:36
【问题描述】:
我正在尝试使用 ReporteRs 在 R 中创建一个幻灯片。我已经使用 ggplot2 创建了我的图表。我安装了 ReporteRs 没有问题,我可以创建一个新的 pptx,添加幻灯片和标题,但是当它到达 addPlot Rstudio 在崩溃之前对其进行处理,给我 R Studio 中止并遇到致命错误的消息.有谁之前经历过这个吗?这是我为 ReporteR 编写的代码:
install.packages("ReporteRs")
library(ReporteRs)
WinR = pptx()
slide.layouts(WinR)
WinR = addSlide(WinR,"Title and Content")
WinR = addTitle(WinR, "Effect of Time on Total Root Length")
WinR = addPlot(WinR, Lengthplotfinal)`
Lengthplotfinal是之前开发的条形图
谢谢!
【问题讨论】:
-
崩溃报告应发送至 RStudio。不要用反引号终止代码块。并且无法繁殖。只会报错:
object 'Lengthplotfinal' not foundError in vector.pptx.graphic(doc = doc, fun = fun, pointsize = pointsize, : an error occured when executing plot function.不在 RStudio 中运行,而是在 Mac GUI 中运行。 -
ReporteRs 现已弃用。您可能想看看我的新导出包,它使用官员作为后端轻松将图形导出到 Powerpoint,请参阅 cran.r-project.org/web/packages/export/index.html 和 github.com/tomwenseleers/export
标签: r ggplot2 rstudio reporters