Code for Kaggle's digit recognizer contest in R