# Adapted from https://gist.github.com/brendano/39760
show.digit <- function(digit, col=gray(12:1/12), ...) {
opa <- par(mar = rep(0, 4))
image(matrix(digit, nrow=28)[,28:1], col=col, axes = FALSE, ...)
par(mar = opa)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.