Description Usage Arguments Value Examples
View source: R/internal_functions.R
Replace a plot at a bookmark location saving it as a PNG file in a temporary
folder.
A bookmark will be considered as valid if enclosing words within a paragraph;
i.e., a bookmark along two or more paragraphs is invalid,
a bookmark set on a whole paragraph is also invalid,
but bookmarking few words inside a paragraph is valid.
1 | body_replace_gg_at_bkm(doc, gg, bookmark, width = 6, height = 3)
|
doc |
a docx device |
gg |
a ggplot object or any object that can be printed in grDevices::png() |
bookmark |
bookmark id |
width |
the width of the device in inches |
height |
the height of the device. |
doc
1 2 3 4 5 6 7 8 | doc <- officer::read_docx(path = file.path(system.file(package = "EpiReport"),
"template/AER_template.docx" ))
p <- EpiReport::getTrend()
doc <- EpiReport::body_replace_gg_at_bkm(doc = doc,
gg = p,
bookmark = "TS_TREND",
width = 6,
height = 3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.