Use base R’s dist() function to calculate pairwise distances between observations, supporting hierarchical clustering of NBA draft data. section 3.9
NBA draft distances
distance_matrix <- dist(draft_clust_final, method = "euclidean") print(distance_matrix) For points at picks 1 and 3, the approximate Euclidean distance is 3.36; picks 2 and 3 are 15.43 units apart.
