R: Function to export currently active R plot to Powerpoint/Word/LibreOffice
问题 Currently I always export my R graphs to Powerpoint in vector format using the excellent ReporteRs package, as in library(ReporteRs) myplot = function() print(qplot(Sepal.Length, Petal.Length, data = iris, color = Species, size = Petal.Width, alpha = I(0.7))) doc = pptx() doc = addSlide(doc, slide.layout = "Blank") doc = addPlot( doc, myplot, vector.graphic = TRUE, fontname="Arial", offx = 0.1*dim(doc)$slide.dim["width"], offy = 0.05*dim(doc)$slide.dim["height"], width = 0.8*dim(doc)$slide