Skip to content

Instantly share code, notes, and snippets.

@davidgohel
Created March 20, 2017 11:23
Show Gist options
  • Save davidgohel/d4d9448590996673cf671c65caf68d0e to your computer and use it in GitHub Desktop.
Save davidgohel/d4d9448590996673cf671c65caf68d0e to your computer and use it in GitHub Desktop.
library(ReporteRs)
require( ggplot2 )
myplot <- qplot(Sepal.Length, Petal.Length,
data = iris, color = Species,
size = Petal.Width, alpha = I(0.7) )
xx <- pptx()
xx <- addSlide(xx, "Title and Content")
# get slide dimensions
slide_dims <- dim(xx)$slide.dim
xx <- addPlot(xx, fun = print, x = myplot,
offx = 0, offy = 0,
width = slide_dims["width"], height = slide_dims["height"])
writeDoc(xx, "test.pptx")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment