R:如何修复名称空间错误?

时间:2014-02-23 12:17:46

标签: r namespaces

我想使用NGramTokenizer中的RWeka但由于某种原因我收到此错误: 我需要以下功能

BigramTokenizer <- function(x) NGramTokenizer(x, Weka_control(min = 2, max = 2))
bigramWords.dtm <- DocumentTermMatrix(Corpus(VectorSource(SentenceVector)), control = list(tokenize = BigramTokenizer))

所以我安装了RWeka:

package ‘RWekajars’ successfully unpacked and MD5 sums checked
package ‘RWeka’ successfully unpacked and MD5 sums checked

可是:

> library(RWeka)
Error : package ‘methods’ does not have a namespace
Error: package or namespace load failed for ‘RWeka’

我也会在安装包之前遇到命名空间错误:

install.packages("dplyr")
Installing package into ‘C:/Users/SomeUser/Documents/R/win-library/3.0’
(as ‘lib’ is unspecified)
Warning in install.packages :
  dependency ‘methods’ is not available
also installing the dependencies ‘assertthat’, ‘BH’

0 个答案:

没有答案