flextable (version 0.5.5)

ph_with.flextable: add a flextable into a PowerPoint slide

Description

Add a flextable in a PowerPoint document object produced by read_pptx.

Usage

# S3 method for flextable
ph_with(x, value, ...)

Arguments

x

a pptx device

value

flextable object

...

Arguments to be passed to methods, argument location is mandatory.

Examples

Run this code
# NOT RUN {
library(officer)

ft = flextable(head(iris))

doc <- read_pptx()
doc <- add_slide(doc, "Title and Content", "Office Theme")
doc <- ph_with(doc, ft, location = ph_location_left())

fileout <- tempfile(fileext = ".pptx")
print(doc, target = fileout)
# }

Run the code above in your browser using DataCamp Workspace