Description Usage Arguments Value TODO Examples
This function replaces a piece of text with an image.
1 2 | wdReplaceTextByImage(find = "", file, wdapp = .R2wd, wd = getwd(),
warn = TRUE)
|
find |
A string. |
file |
The path to the image. |
Invisibly returns a pointer to new inlineshape object.
handle case if text is found multiple times
1 2 3 4 5 6 7 8 9 10 | file <- system.file("inst/template.docx", package = "R2wdaddons")
wdGet2(file)
# image file to put in document
img <- system.file("inst/sky.jpeg", package = "R2wdaddons")
# replace and rescale first image
shp <- wdReplaceTextByImage("[placeholder 1]", img)
wdScaleImage(ishp = shp, width=200, units="px")
wdAddImageCaption(ishp = shp, title = "Image is 200 pixels wide")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.