fillimage | R Documentation |
Please note that this function will be depreciated. Use addImage() instead: addImage(onesheet, image, line, col, wide, high, unit, spec.dpi, wb). Insert either an existing image or the current plot into a worksheet.
fillimage(...)
... |
Arguments of addImage() function |
Nothing
Jenny Howard, Marine Maurel
addImage()
## Not run:
addImage(onesheet = cells,
image = graphname,
line = 2,
col = 2,
wb = template)
## End(Not run)
# Usage 1: Insert existing image saved as a PNG file
xls_file <- externalFile("excelfile.xlsx")
openXlsx(xls_file)
cells <- openSheet("T2")
image_file <- externalFile("image_xlsx.png")
addImage(onesheet = cells, image = image_file, line = 20, col = 2)
# Usage 2: Insert current plot
## Not run:
image_gg <- ggplot(Orange,
aes(x = age, y = circumference, colour = as.factor(Tree))) +
geom_point() +
geom_line() +
labs(colour = "Tree") +
theme_minimal()
addImage(onesheet = cells, image = image_gg, line = 20, col = 2)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.