ReporteRs (version 0.8.6)

addDate: Insert a date

Description

Insert a date into a document object

Usage

addDate(doc, ...)
"addDate"(doc, value, str.format = "%Y-%m-%d", ...)

Arguments

doc
document object
...
further arguments passed to other methods
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).

Value

a document object

Details

addDate only works for pptx documents.

See Also

pptx, addFooter, addPageNumber

Examples

Run this code
doc.filename = "addDate_example.pptx"

options( "ReporteRs-fontsize" = 24 )
doc = pptx( title = "title" )
doc = addSlide( doc, slide.layout = "Title Slide" )
#set the main title
doc = addTitle( doc, "Presentation title" ) 
#set the sub-title
doc = addSubtitle( doc , "This document is generated with ReporteRs.")

## 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" )

writeDoc( doc, file = doc.filename )

Run the code above in your browser using DataCamp Workspace