ic_pptfig | R Documentation |
Function to place R generated figures into a PowerPoint Template
ic_pptfig(
my_pres = NA,
size = "letter",
orientation = "L",
fig = ggplot2::last_plot(),
section = "",
fignum,
note = "",
author,
doctitle1,
doctitle2 = "",
doctitle3 = "",
draft = "DRAFT",
pc = "Privileged and Confidential",
showpath = T
)
my_pres |
template pptx, defaults to read from read_pptx_template function |
size |
Presentation size: letter (default) or ledger. |
orientation |
Presentation orientation: landscape (L, default) or Portrait (P) |
fig |
graphics object that is compatible with officer, defaults to last last_plot() |
section |
Optional section number |
fignum |
Figure number after the section-figure number |
note |
Optional figure notes text to include under figure |
author |
The script author |
doctitle1 |
Document Title 1 |
doctitle2 |
Optional Document Title 2 |
doctitle3 |
Optional Document Title 3 |
draft |
Bold red text to be included next to figure caption, "DRAFT" is default |
pc |
Privileged and Confidential label, "Privileged and Confidential" is default |
showpath |
Show script path on page. Default is True |
PowerPoint presentation with added figure Note: function dml() creates an editable figure in PowerPoint fig <- dml(ggobj = p) #for ggplot object fig <- dml(grid.arrange(p1, p2, p3, p4, nrow = 4))
#' my_pres <- ic_pptfig( fig = ggplot2::ggplot(), fignum = "1", author = "J. Doe", doctitle1 = "example figure")
# Print presentation in calling script
# print(my_pres, "Output_File-Name.pptx") #must end in .pptx
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.