powered by
Calculates two-dimensional Euclidean distance between all points and dimension means.
Euclidean(data)
Returns a numeric vector of length 1.
an n x 2 matrix or data frame.
n x 2
data <- matrix(c(rnorm(50, 0, 1), rnorm(50, 5, 1)), ncol = 2, byrow = TRUE) Euclidean(data)
Run the code above in your browser using DataLab