powered by
Computes the cosine similarity between numeric vectors
cosine_dist(m)
the data matrix
Returns the cosine similarity
# NOT RUN { a <- c(2, 1, 0, 2, 0, 1, 1, 1) b <- c(2, 1, 1, 1, 1, 0, 1, 1) sim <- cosine_dist(rbind(a,b)) # }
Run the code above in your browser using DataLab