close, but not yet

Hi Aaron and Tommy--here is my knn R script. I think I'm almost done with it, but for some reason the last few steps or two have been tricky for me. I'm not going to give up on it, but thought I would share what I have so far.