Replace a plot at a bookmark location
body_replace_gg_at_bkm.Rd
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.
Examples
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)