Places content in a PowerPoint placeholder for a given officer document.
add_pptx_ph_content(obnd, content_type, content, ph_label, verbose = TRUE)
onbrand report object
string indicating the content type
content
placeholder location (text)
Boolean variable when set to TRUE (default) messages will be displayed on the terminal; Messages will be included in the returned onbrand object.
officer pptx object with the content added
For each content type listed below the following content is expected:
"text"
text string of information
"list"
vector of paired values (indent level and text), eg. c(1, "Main Bullet", 2 "Sub Bullet")
"imagefile"
string containing path to image file
"ggplot"
ggplot object, eg. p = ggplot() + ....
"table"
list containing the table content and other options with the following elements (defaults in parenthesis):
table
Data frame containing the tabular data
header
Boolean variable to control displaying the header (TRUE
)
first_row
Boolean variable to indicate that the first row contains header information (TRUE
)
"flextable"
list containing flextable content and other options with the following elements (defaults in parenthesis):
table
Data frame containing the tabular data
header_top
, header_middle
, header_bottom
(NULL
) a list with the same names as the data frame names containing the tabular data and values with the header text to show in the table
header_format
string containing the format, either "text"
, or "md"
(default NULL
assumes "text"
format)
merge_header
(TRUE
) Set to true to combine column headers with the same information
table_body_alignment
, table_header_alignment ("center") Controls alignment
table_autofit
(TRUE
) Automatically fit content, or specify the cell width and height with cwidth
(0.75
) and cheight
(0.25
)
table_theme
("theme_vanilla"
) Table theme
"flextable_object"
user defined flextable object