odfWeave (version 0.8.4)

odfInsertPlot: Write XML for image inseration

Description

Writes ODF markup to allow images in documents. Also can copy the image file to the Picture directory.

Usage

odfInsertPlot(file, height, width, units = "in", anchor = c("", ""), name = paste("graphics", floor(runif(1) * 1000), sep = ""), externalFile = FALSE, dest = paste(getwd(), "/Pictures", sep = ""), caption = NULL)

Arguments

file
a string for the image file location
height
the dispay height of the image
width
the dispay width of the image
units
the units for the display dimensions
anchor
a character vector of length 2. The image markup will be sandwiched between these two elements
name
a name for the figure
dest
the locaiton of the pciture directory
externalFile
a logical; was the plot automatically generated by R during Sweaving? If TRUE, then the file is copied to the Pictures directory.
caption
either NULL (for no caption) or the output of odfFigureCaption. Note that specifying a caption results in the iamge being placed within a frame

Value

a character string

Examples

Run this code
odfInsertPlot("plot.png", 4, 4)

Run the code above in your browser using DataCamp Workspace