[R] RWeka problem: java.lang.NoSuchMethodError

Yonghee Shin syonghee at gmail.com
Wed Aug 4 17:29:27 CEST 2010


Hi,

I'm trying to use RWeka and followed the following example from the 
RWeka manual.

============
## Use some example data.
w <- read.arff(system.file("arff","weather.nominal.arff",
package = "RWeka"))
## Identify a decision tree.
m <- J48(play~., data = w)
m
## Use 10 fold cross-validation.
e <- evaluate_Weka_classifier(m,
cost = matrix(c(0,2,1,0), ncol = 2),
numFolds = 10, complexity = TRUE,
seed = 123, class = TRUE)
e
summary(e)
e$details
============

But executing "J48(play~., data = w)" generates the following error:
======
Error in .jnew("weka/core/Attribute", attname[i], .jcast(levels, 
"java/util/List")) :
  java.lang.NoSuchMethodError: <init>
======

Can anybody help me to fix this problem?
Thanks!



More information about the R-help mailing list