I'm trying to use kmeans clustering on a relatively large matrix (4000x4000) using the amap::Kmeans function but R seems to be freezed even after more than half an hour. I have to restart R after this. Apparently it's not a RAM problem and R's built-in kmeans algorithm works fine using euclidean distance.
I think the problem lies in the implementation of amap::Kmeans but I see not alternatives to this function if I want to use the Kendall tau's dissimilarity distance measure.
As a "reproducible example" take the following line of code:
amap::Kmeans(matrix(rnorm(1:4000**2), 1:400, 1:400), centers = 10, method="kendall")
What other alternatives do I have if I want to achieve the same results that can be obtained from the above line of code?