I have a data frame as follows:
X1 X2 X3 3 102.20000 26.07667 4 115.00000 25.12500 5 36.70000 35.05545
If column X1 denotes a unique identifier for the row, and X2, X3 are functions
I want to scale before doing k means data clustering,
mydata <- scale(mydata) X1 X2 X3 -11715.6 -12.2200734 -9.7826627 -11714.6 0.5799266 -10.7343294 -11713.6 -77.7200734 -0.8038748
I donβt want the X1 column to scale, but I want it to stay on the data frame. Any way to do this?
source share