R programs for kaggle handwritten digits recognition competition.