# NOT RUN {
# Title example for MS Word -------
# }
# NOT RUN {
doc.filename = "ex_add_title.docx"
doc <- docx()
doc <- addTitle( doc, "Title example 1", level = 1 )
doc <- addTitle( doc, "Title example 2", level = 1 )
writeDoc( doc, file = doc.filename )
# }
# NOT RUN {
# Title example for PowerPoint -------
doc.filename = "ex_add_title.pptx"
doc <- pptx()
doc <- addSlide(doc, "Title and Content")
doc <- addTitle(doc, "Title example")
writeDoc( doc, file = doc.filename )
# }
Run the code above in your browser using DataLab