Add plots in PPTx without crashing R using addplot()

早过忘川 提交于 2019-12-08 13:11:00

问题


I tried to add my C50 tree plot to ppt from R. (ps: not R markdown) However, I am not sure if its because the plot size was too large or not, everytime I ran the code as below, it crashed my R studio. I even tried the code without re-sizing the plot (where I put # to not include that part of code) but it did not work. I tried to add the plot to PDF and it worked and it was clearly displayed. But I really need to figure out a way to put it into the PPTX.

Sorry I cannot show you guys the tree plot here but just image it with six nodes and the image has larger width and height.

mydoc is the pptx file name, and plot is plot <- plot(Tree01) where Tree01 is my C50 model. I am using the newest R studio.

`mydoc = addSlide(mydoc,slide.layout="Title and Content")
mydoc = addTitle(mydoc, "Tree Plot" )
mydoc = addPlot( doc = mydoc , fun = function(x) print(plot))#,
                 #offx = 0.5, offy = 2, width = 5, height = 4 )`

CRASHED MY R STUDIO

来源:https://stackoverflow.com/questions/36092569/add-plots-in-pptx-without-crashing-r-using-addplot

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!