Text classifier with KNN in R - using tm, plyr