rpptx_document {officedown} | R Documentation |
Advanced R Markdown PowerPoint Format
Description
Format for converting from R Markdown to an MS PowerPoint document.
The function will allow you to specify the destination of your chunks in the output
PowerPoint file. In this case, you must specify the layout
and master
for the
layout you want to use, as well as the ph
argument, which will allow you to specify
the placeholder to be generated to place the result. Use the officer package to help
you choose the identfiers to use.
This function also support Vector graphics output in an editable format (using package
rvg
). Wrap you R plot commands with function dml
to use this graphic capability.
Usage
rpptx_document(
base_format = "rmarkdown::powerpoint_presentation",
layout = "Title and Content",
master = "Office Theme",
tcf = list(),
...
)
Arguments
base_format |
a scalar character, format to be used as a base document for officedown. default to powerpoint_presentation but can also be powerpoint_presentation2 from bookdown |
layout |
default slide layout name to use |
master |
default master layout name where |
tcf |
default conditional formatting settings
defined by |
... |
arguments used by powerpoint_presentation |
Value
R Markdown output format to pass to render
Examples
library(rmarkdown)
run_ok <- pandoc_available() && pandoc_version() > numeric_version("2.4")
if(run_ok){
example <- system.file(package = "officedown",
"examples/minimal_powerpoint.Rmd")
rmd_file <- tempfile(fileext = ".Rmd")
file.copy(example, to = rmd_file)
pptx_file_1 <- tempfile(fileext = ".pptx")
render(rmd_file, output_file = pptx_file_1)
}