shipunov (version 1.5)

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 DataCamp Workspace