show_digit: Visualize MNIST digit.

Description Usage Arguments Note Examples

View source: R/mnist.R

Description

Display an MNIST digit as an image the hand-written digit represented by the nth row in a data frame.

Usage

1
show_digit(df, n, col = grDevices::gray(12:1/12), ...)

Arguments

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 image function.

Note

Originally based on a function by Brendan O'Connor.

Examples

1
2
3
4
5
6
## Not run: 
# show the fifth digit
mnist <- download_mnist()
show_digit(mnist, 5)

## End(Not run)

jlmelville/mnist documentation built on May 19, 2019, 12:47 p.m.