K mean clustering method of data mining I am reading about k-means clustering method.

How does the method calculate the mean between two coordination points?
How does the method work with more than two dimensions? How can calculate the distance and the mean if there are more than two dimension?

Are there any packages about k-means clustering in R?
To answer simply, Euclidean distance is generally used:

$$ d = |\mathbf{x}-\mathbf{y}|=\sqrt{\sum_{i=1}^n|x_i-y_i|^2}$$

Read more about k-means over here:


Introduction to K-means
k-means clustering algorithm


Using kmeans() in R:


K Means Clustering in R