img {base64} | R Documentation |
This creates html code to embed a png file into an html document.
img(file, Rd = FALSE)
file |
png file to translate into a data uri |
Rd |
if TRUE, extra markup is added to facilitate inclusion of the image in an Rd file |
The following graph is embedded in the document using the img
function
The html code
no checking on the file is performed, so it is up to the user to make sure the input file is indeed a png file
Romain Francois <romain@r-enthusiasts.com>
encode is used to encode the file
## Not run: pngfile <- tempfile() png( pngfile, width = 600, height = 600 ) plot( 1:100, rnorm(100), pch = 21, bg = "red", cex = 2 ) dev.off() img( pngfile ) ## End(Not run)