Learn R Programming

officer (version 0.7.1)

print.rpptx: Write a 'PowerPoint' file.

Description

Create a 'PowerPoint' file from an rpptx object (created by read_pptx()).

Usage

# S3 method for rpptx
print(x, target = NULL, preview = FALSE, ...)

Value

If preview is TRUE, returns the temp file path invisibly.

Arguments

x

an rpptx object.

target

path to the .pptx file to write. If target is NULL (default), the rpptx object is printed to the console.

preview

Save x to a temporary file and open it (default FALSE).

...

unused.

See Also

read_pptx()

Examples

Run this code
# write an rpptx object to a .pptx file ----
file <- tempfile(fileext = ".pptx")
x <- read_pptx() # empty presentation, has no slides yet
print(x, target = file)

# preview mode: save to temp file and open locally ----
if (FALSE) {
print(x, preview = TRUE)
}

Run the code above in your browser using DataLab