add_slide_plot: Puts a graph into a PowerPoint slide.

Description Usage Arguments Value Examples

View source: R/add_slide_plot.R

Description

A function that creates a slide for displaying a ggplot graph.

Usage

1
2
3
4
5
6
7
8
9
add_slide_plot(
  presentation_template,
  slide_id = "",
  myplot,
  description_text = "",
  title = "?",
  layout = "content_slide",
  master = "master_content"
)

Arguments

presentation_template

Powerpoint template.

myplot

The graph you want to display in the slide.

description_text

text string to add below plot. empty by default.

title

Set a title at the top of the slide.

layout

The name of the layout in the template. The default is 'content_slide'.

master

The name of the slide template. The default is 'master_content'.

slide_ID

The name of the slide for QA.

Value

Produces a single slide in the presentation.

Examples

1
2
3
4
5
new_presentation <- ppt_template %>%
   add_slide_plot(slide_id = "a printted QA name",
                  myplot = ggplot(mtcars, aes(mpg, disp)) + geom_point(),
                  title = "A very simple plot in a simple slide")
print(new_presentation, "tmp.pptx")

sarid-ins/saridr documentation built on Nov. 10, 2020, 9:07 p.m.