install.packages('lsa',dependencies=T)
library(lsa)
m1<-c(1,2,1,0)
m2<-c(1,1,1,0)
cosine(m1,m2)
problem:
4 accepted | Dah, not long after posting I found the answer here: Although I already had Sun Java installed, the key was to run sudo update-java-alternatives -s java-6-sunsudo R CMD javareconf |
http://www.cnblogs.com/lexus/archive/2011/12/01/2271060.html