fileout <- tempfile(fileext = ".pptx")
doc <- read_pptx()
doc <- add_slide(doc, layout = "Two Content",
master = "Office Theme")
doc <- ph_with(x = doc, value = empty_content(),
location = ph_location_type(type = "title") )
doc <- add_slide(doc)
# add slide number as a computer field
doc <- ph_with(
x = doc, value = empty_content(),
location = ph_location_type(type = "sldNum"))
print(doc, target = fileout )
Run the code above in your browser using DataLab