I found a function here to create a ppt with a slide for a plot created in R. Here is the link to that function: R: Function to export currently active R plot to Powerpoint/Word/LibreOffice
I would like my program to add several slide (containing one plot each).
I currently use : export2ppt(file="plot.pptx") But I can't figure out how I add a second plot to the same file .
addPlot(which used in your fucntion . added new list with plot , so you can use it more than one times if wont to add additional plotif (type=="PPT") {doc = pptx();doc = addSlide(doc, slide.layout = "Blank");pagesize = dim(doc)$slide.dim} else {doc = docx();pagesize = dim(doc)$page-dim(doc)$margins[c(4,3)]} pageaspectr = pagesize["width"]/pagesize["height"]doc=pptx()thenaddSlide()+addPlot()for each your plot and at endwriteDoc()