View source: R/saveAllGraphsIntPptx.R
saveGraph2pptx | R Documentation |
saveGraph2pptx
: a nifty function that
saves all the graphics
present in the Global Environment (i.e., .GlobalEnv
)
into a PowerPoint file. Requires packages rsv
and officer
. Graphics saved are only those created
with recordPlot()
or ggplot2
.
saveGraph2pptx(file2Save.pptx, title = NULL, addGraphNames = FALSE)
file2Save.pptx |
the name of the PowerPoint file for saving the graphs. If this file already exists, the old file is renamed and a warning message is printed in the console. |
title |
main title of the PowerPoint file.
|
addGraphNames |
when |
a list (of class "savePptx"
)
with listOfsavedGraphs
(the list of the graph objects
saved) and
nameOfSavingFile4pptx
(name of the files where
the graphics are saved).
Note: to print one of the graphs from
nameOfSavingFile4pptx
, use
print(get())
. For example,
to print the first graph of the list
saved as listOfGraph
use
print(get(listOfGraph$listOfsavedGraphs[[1]]))
.
Hervé Abdi
## Not run: toto <- saveGraph2pptx("myFile.pptx", "Pretty Graphs of the Day") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.