在RKEA插图中执行示例时出错

时间:2015-11-26 01:26:35

标签: r

我正在试用RKEA包,并运行了小插图中列出的示例,如下所示:

library("RKEA")
library("tm")
data("crude")
keywords <- list(c("Diamond", "crude oil", "price"),
                 c("OPEC", "oil", "price"),
                 c("Texaco", "oil", "price", "decrease"),
                 c("Marathon Petroleum", "crude", "decrease"),
                 c("Houston Oil", "revenues", "decrease"),
                 c("Kuwait", "OPEC", "quota"))
tmpdir <- tempfile()
dir.create(tmpdir)
model <- file.path(tmpdir, "crudeModel")
createModel(crude[1:6], keywords, model)

我收到了此错误消息。

Error in .jcall(km, "V", "saveModel") : 
  java.lang.NoSuchMethodError: weka.core.Attribute.<init>(Ljava/lang/String;Lweka/core/FastVector;)V

出了什么问题?我还加载了包RKEARWekaRWekajars,如果有任何用于疑难解答的话。

编辑:我的Java是版本8更新66(版本1.8.0_66-b17)。 sessionInfo()输出如下:

R version 3.2.2 (2015-08-14)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=English_Singapore.1252  LC_CTYPE=English_Singapore.1252   
[3] LC_MONETARY=English_Singapore.1252 LC_NUMERIC=C                      
[5] LC_TIME=English_Singapore.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] tm_0.6-2           NLP_0.1-8          RKEA_0.0-6         RWekajars_3.7.12-1
[5] RWeka_0.4-24      

loaded via a namespace (and not attached):
[1] parallel_3.2.2 tools_3.2.2    slam_0.1-32    RKEAjars_5.0-1 grid_3.2.2    
[6] rJava_0.9-7  

0 个答案:

没有答案