问题
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