i have same problem like this topic [https://stackoverflow.com/questions/50107157/adding-labels-to-cluster, i followed the replied answer still not working on me then try to find another solution from this [https://stackoverflow.com/questions/8120984/scaling-data-in-r-ignoring-specific-columns also still not working
so far my code just follow from this topic [https://uc-r.github.io/kmeans_clustering and [https://afit-r.github.io/kmeans_clustering as shown below
1. library(tidyverse)
2. library(cluster)
3. library(factoextra)
4. dataMCU = read.csv("MCU180721.csv")
5. dataMCU <- na.omit(dataMCU)
6. dataMCU <- scale(dataMCU)
this line number: 6 failed to proceed since show error like this Error in colMeans(x, na.rm = TRUE) : 'x' must be numeric
for addition information my table in csv file describe below precint, green, yelloe, orange, red oregon, 6, 7, 8, 9
my question is how to resolve this problem.
recently i've tried with this code dataMCU<-dataMCU[,c(-1)]
before run scale()
this solution works but not as expected. since i wish to have same result just like [https://uc-r.github.io/kmeans_clustering and [https://afit-r.github.io/kmeans_clustering
for additional information:
this from [https://afit-r.github.io/kmeans_clustering