addImage | R Documentation |
This function and its methods allow the R programmer to place an image (e.g. JPEG or PNG file) on an Excel worksheet.
addImage(sheet, img, from = c(1, 1), to = c(4, 4), dim = c(100, 100),
desc = img, update = TRUE, ...)
sheet |
the worksheet on which to place the image |
img |
the name of the image file to be placed. (This could be the raw data representing the image) |
from |
the top-left location for the image in terms of rows and columns. This can be specified in cell format, e.g. "A5" |
to |
the bottom right location of the image |
dim |
the width and height of the image. We could read this automatically but require additional packages. |
desc |
a string giving a description of the image. |
update |
a logical value that controls whether the modified XML documents are written back to the Excel archive (.xlsx) file. If not, the updated documents are returned and can be added to the archive later. |
... |
additionak parameters for methods |
Duncan Temple Kang
addChart
in development.
# See the test files
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.