Axel Ullern
Axel Ullern

Reputation: 71

Trying to export graphics from R (ggplot2) to powerpoint

can someone explain me why the package "ReporteRs" mentioned in numerous communications as THE package to make these kind of export is not anymore available ? What is the replacement ? I read a mention about an alternative : "officer" but I was unable to find it. Many Thanks for your help . Ax

Upvotes: 2

Views: 2758

Answers (1)

Tom Wenseleers
Tom Wenseleers

Reputation: 7989

If you would like to export R graphs to Powerpoint you can also use the wrapper package export built on top of officer that just came out on CRAN, see https://cran.r-project.org/web/packages/export/index.html and for demo https://github.com/tomwenseleers/export

Typical syntax is very easy, e.g.:

install.packages("export")
library(export)
library(ggplot2)
qplot(Sepal.Length, Petal.Length, data = iris, color = Species, 
      size = Petal.Width, alpha = I(0.7))     
graph2ppt(file="ggplot2_plot.pptx", width=6, height=5) 

You can also use it to export to Word, Excel, Latex or HTML and you can also use it to export statistical output of various R stats objects.

Upvotes: 2

Related Questions