ReporteRs (version 0.5)

addDate.pptx: Insert a date shape into a document pptx object

Description

Insert a date into the current slide of a pptx object.

Usage

# S3 method for pptx
addDate (doc, value,
    str.format = "%Y-%m-%d", ...)

Arguments

doc

Object of class "pptx"

value

character value to add into the date shape of the current slide. optionnal. If missing current date will be used.

str.format

character value to use to format current date (if value is missing).

...

further arguments, not used.

Value

a document object

See Also

pptx, addFooter.pptx, addPageNumber.pptx , strptime, addDate

Examples

Run this code
# NOT RUN {
#START_TAG_TEST
# Create a new document
doc = pptx( title = "title" )
# add a slide with layout "Title Slide"
doc = addSlide( doc, slide.layout = "Title Slide" )
doc = addTitle( doc, "Presentation title" ) #set the main title
doc = addSubtitle( doc , "This document is generated with ReporteRs.")#set the sub-title

## add a date on the current slide
doc = addDate( doc )

doc = addSlide( doc, slide.layout = "Title and Content" )
## add a page number on the current slide but not the default text (slide number)
doc = addDate( doc, "Dummy date" )

# Write the object in file "presentation.pptx"
writeDoc( doc, "addDate_example.pptx" )
#STOP_TAG_TEST
# }

Run the code above in your browser using DataCamp Workspace