updating R code
adding KNN code based on histogram comparison with EMDIST, earth mover
distance