Is there a good way to use data from R and a package like ReporteRs to generate complete Powerpoints? I have about 900 slides to create. Our analysts currently follow this path:
DB --> SAS --> CSV --> PPTX (embedded graphics) (x900 times)
This is manual, open to lots of errors and slow.
Ideally, I would prefer:
DB --> R + ReporteRs --> PPTX (x1 time)
The issue is 2-fold. First, our clients (unreasonably) prefer PPTX over a web or even PDF format. Second, R graphics cannot be edited in PPTX, and are sometimes not ideally sized/formatted, especially in terms of axis text sizes. So is there a way to use R to create editable Powerpoint graphics, hyperlinked tables of contents, etc? If not that, is there at least a good set of ggplot2 templates to use with decent PPTX presentation formatting?
Solved. Turned out to be a severe case of "Not Reading the Manual." The solution is to use the
ReporteRs
R package AND read the manual. :)The Manual:
The key paragraph: DrawingML instructions for [...] pptx objects. DrawingML instructions offer [the] advantage [of] provid[ing] editable graphics.
So simply set
vector.graphic=TRUE
and you're set.I am now able in Powerpoint to edit graphics created in R: legends, axis text, all graphical symbols. Everything. This is Xmass come early! Thank you ReporteRs creators! I can now do in 3 hours what would have taken 300 before! Amazing.
Full worked out example below:
Result:
You can use my new
export
package that just came out on CRAN to easily export to Office (Word/Powerpoint) in native Office vector format, resulting in fully editable graphs, see https://cran.r-project.org/web/packages/export/index.html and https://github.com/tomwenseleers/exportFor example: