set_doc_properties | R Documentation |
set Word or PowerPoint document properties. These are not visible in the document but are available as metadata of the document.
Any character property can be added as a document property. It provides an easy way to insert arbitrary fields. Given the challenges that can be encountered with find-and-replace in word with officer, the use of document fields and quick text fields provides a much more robust approach to automatic document generation from R.
set_doc_properties(
x,
title = NULL,
subject = NULL,
creator = NULL,
description = NULL,
created = NULL,
...,
values = NULL
)
x |
an rdocx or rpptx object |
title , subject , creator , description |
text fields |
created |
a date object |
... |
named arguments (names are field names), each element is a single character value specifying value associated with the corresponding field name. |
values |
a named list (names are field names), each element is a single
character value specifying value associated with the corresponding field name.
If |
The "last modified" and "last modified by" fields will be automatically be updated when the file is written.
Other functions for Word document informations:
doc_properties()
,
docx_bookmarks()
,
docx_dim()
,
length.rdocx()
,
styles_info()
x <- read_docx()
x <- set_doc_properties(x, title = "title",
subject = "document subject", creator = "Me me me",
description = "this document is empty",
created = Sys.time(),
yoyo = "yok yok",
glop = "pas glop")
x <- doc_properties(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.