powered by
Calculates cosine distance
Cosine.dist(data.x, data.y=data.x)
A matrix containing variables that should be used in the computation of the distance.
A matrix compatible with 'data.x' (optional).
Distance object with distances among rows of 'data.x' and optionally those of 'data.y'
Cosine.dist() does not work with data frames, convert them with e.g., as.matrix().
dist
# NOT RUN { plot(hclust(Cosine.dist(as.matrix(iris[!c(rep(1, 9), 0), -5])))) # }
Run the code above in your browser using DataLab