install lsa package for R on ubuntu 10.04 lts lucid

install.packages('lsa',dependencies=T)

library(lsa)

m1<-c(1,2,1,0)

m2<-c(1,1,1,0)

cosine(m1,m2)

http://cran.r-project.org/web/packages/lsa/index.html

problem:

http://stackoverflow.com/questions/7129303/cant-install-rjava-0-9-on-ubuntu-10-04


4
down voteaccepted

Dah, not long after posting I found the answer here:

http://realshared.com/2011/how-to-install-r-jgr-and-deducer-in-ubuntu-10-04.htm

Although I already had Sun Java installed, the key was to run update-java-alternatives to actually switch to Sun Java first before running javareconf:

sudo update-java-alternatives -s java-6-sun
sudo R CMD javareconf
link|edit|flag
要解决这个问题,还得参考如下的链接

http://www.cnblogs.com/lexus/archive/2011/12/01/2271060.html

原文地址:https://www.cnblogs.com/lexus/p/2271082.html