Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ph_with.flextable

add a flextable into a PowerPoint slide


Description

Add a flextable in a PowerPoint document object produced by officer::read_pptx().

Usage

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

Arguments

x

a pptx device

value

flextable object

location

a location for a placeholder. See officer::ph_location_type() for example.

...

unused arguments.

Note

The width and height of the table can not be set with location. Use functions width(), height(), autofit() and dim_pretty() instead. The overall size is resulting from cells, paragraphs and text properties (i.e. padding, font size, border widths).

Examples

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)

flextable

Functions for Tabular Reporting

v0.6.10
GPL-3
Authors
David Gohel [aut, cre], Clementine Jager [ctb], Quentin Fazilleau [ctb], Maxim Nazarov [ctb] (rmarkdown for docx output), Titouan Robert [ctb], Michael Barrowman [ctb] (inline footnotes), Atsushi Yasumoto [ctb] (support for bookdown cross reference), Paul Julian [ctb] (support for gam objects)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.