on_slide: change current slide

Description Usage Arguments Examples

View source: R/read_pptx.R

Description

change current slide index of an rpptx object.

Usage

1
on_slide(x, index)

Arguments

x

rpptx object

index

slide index

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
doc <- read_pptx()
doc <- add_slide(doc, layout = "Title and Content", master = "Office Theme")
doc <- add_slide(doc, layout = "Title and Content", master = "Office Theme")
doc <- add_slide(doc, layout = "Title and Content", master = "Office Theme")
doc <- on_slide( doc, index = 1)
doc <- ph_with_text(x = doc, type = "title", str = "First title")
doc <- on_slide( doc, index = 3)
doc <- ph_with_text(x = doc, type = "title", str = "Third title")

file <- tempfile(fileext = ".pptx")
print(doc, target = file )

davidgohel/oxbase documentation built on Nov. 4, 2018, 4:43 a.m.