cosSim <- function (x){
cosUp <- crossprod(x)
cosDown <- sqrt(colSums(x^2))
cosDown <- cosDown %*% t(cosDown)
return(cosUp / cosDown)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.