img {base64}R Documentation

Encode a png file as a img data uri

Description

This creates html code to embed a png file into an html document. image

Usage

img(file, Rd = FALSE, alt = "image")

Arguments

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

alt

alternate text

Examples

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)

[Package base64 version 2.0.1 Index]