cosine similarity in R
cosineSimilarityR(x)
x
a matrix
a similarity matrix among all rows of the input matrix