Hi all, Last post didn't give the plain format:
I was trying to combine RWeka and FSelector, and do the forward feature selection with J48/C5.4 decision tree: Here is the code: #================== library(RWeka) library(FSelector) library(rpart) data(iris) evaluator <- function(subset) { p <- J48(as.simple.formula(subset, "Species"), data=iris) e <- evaluate_Weka_classifier(p) print(subset) print(e$details[1]) return(e$details[1]) } subset <- forward.search(names(iris)[-5], evaluator) ========================= I got this error, when I ran it: Error in paste(attributes, sep = "", collapse = " + ") : cannot coerce type 'closure' to vector of type 'character' I don't know how I could fix this problem. Thanks. Yanwei ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.