Free Access Week - Data Engineering + BI
Data Engineering and BI courses are free this week!
Free Access Week - Jun 2-8

shipunov (version 1.6)

Cosine.dist: Cosine distance

Description

Calculates cosine distance

Usage

Cosine.dist(data.x, data.y=data.x)

Arguments

data.x

A matrix containing variables that should be used in the computation of the distance.

data.y

A matrix compatible with 'data.x' (optional).

Value

Distance object with distances among rows of 'data.x' and optionally those of 'data.y'

Details

Cosine.dist() does not work with data frames, convert them with e.g., as.matrix().

See Also

dist

Examples

Run this code
# NOT RUN {
plot(hclust(Cosine.dist(as.matrix(iris[!c(rep(1, 9), 0), -5]))))
# }

Run the code above in your browser using DataLab