powered by
This creates html code to embed a png file into an html document.
pngfile <- tempfile() png(pngfile, width = 600, height = 400 ) plot(1:100, rnorm(100), pch = 21, bg = "red", cex = 2 ) dev.off() base64::img( pngfile, Rd = TRUE )
img(file, Rd = FALSE, alt = "image")
png file to translate into a data uri
if TRUE, extra markup is added to facilitate inclusion of the image in an Rd file
TRUE
alternate text
pngfile <- tempfile() png(pngfile, width = 600, height = 400) plot(1:100, rnorm(100), pch = 21, bg = "red", cex = 2 ) dev.off() img(pngfile, Rd = TRUE)
Run the code above in your browser using DataLab