powered by
Calculates cosine distance
Cosine.dist(data.x, data.y=data.x)
Matrix with variables that should be used in the computation of the distance.
Matrix compatible with 'data.x' (optional).
Distance object with distances among rows of 'data.x' and optionally those of 'data.y'
If arguments are data frames, Cosine.dist() internally converts them into matrices.
On normalized data, cosine distance is essentially the same as Euclidean.
dist
# NOT RUN { plot(hclust(Cosine.dist(iris[!c(rep(1, 9), 0), -5]))) # }
Run the code above in your browser using DataLab