R/Euclidean.R
Euclidean.Rd
Calculates two-dimensional Euclidean distance between all points and dimension means.
Euclidean(data)
an n x 2 matrix or data frame.
n x 2
Returns a numeric vector of length 1.
data <- matrix(c(rnorm(50, 0, 1), rnorm(50, 5, 1)), ncol = 2, byrow = TRUE) Euclidean(data) #> [1] 3.584474