_ RMeCab の出力に topicmodels の LDA を適用 library (RMeCab) test <- docMatrix2( "morikita") # フォルダを指定 install.packages("slam") library(slam) test.sparse <- as.simple_triplet_matrix( t(test) ) #スパースな行列に変換 library (tm) # この2行で重みを設定 test.sparse2 <- as.DocumentTermMatrix ( test.sparse, weighting = weightTf ) # ## sudo apt-get install libgsl0-dev # Ubuntuの場合,これが必要 install.packages("topicmodels") library(topic