show_mnist_digit | R Documentation |
Display an MNIST digit as an image the hand-written digit represented by the nth row in a data frame.
show_mnist_digit(df, n, col = grDevices::gray(1:255/255), ...)
df |
Data frame containing MNIST digits. |
n |
Row index of the digit to display. |
col |
List of colors to use in the display. |
... |
Other arguments passed onto the |
Originally based on a function by Brendan O'Connor, which can be found at https://gist.github.com/brendano/39760.
## Not run:
# show the fifth digit
mnist <- download_mnist()
show_mnist_digit(mnist, 5)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.