# NOT RUN {
data(mnist_data)
Img_Mat = mnist_data$Images
Img_Label = mnist_data$Labels
digit_data = Img_Mat[1, ] ### image data (784-by-1 vector) of the first handwritten digit (=5)
label = Img_Label[1] ### label of the first handwritten digit (=5)
imgmat = matrix(digit_data, 28, 28) ### transform the vector of image data to a matrix
# }
Run the code above in your browser using DataLab