I need to standardize all except one column in a dataframe, with which I’m using knn. I know that I can do this with loops, but it seems like there might be an easier way, especially since I am working with 200+ columns/factors, which would have to be renamed.
Any suggestions?
yes. I assumed you would prefer to identify the variable not to be scaled based on its name rather than identfying it by it’s column position. Without a toy example I can only surmise this is exactly what you want.