Here is a kludge: > fm <- JRip(Species ~., iris) > as.numeric(sub(".*:", "", grep("Number of Rules", capture.output(fm), value = > TRUE))) [1] 4
On Mon, Apr 26, 2010 at 7:23 AM, fascob <samto...@yahoo.com> wrote: > > Hello, > > I have >> JRip(Species ~ ., data = iris) > JRIP rules: > =========== > > (Sepal.Width <= 2.9) and (Petal.Width <= 1.6) => Species=versicolor > (39.0/5.0) > (Petal.Length >= 4.1) and (Petal.Width <= 1.7) => Species=versicolor > (17.0/2.0) > (Petal.Length >= 4.8) => Species=virginica (46.0/1.0) > => Species=setosa (48.0/0.0) > > Number of Rules : 4 > > > and I will work with the number of rules. > How can I get the number of rule? Where can I find it? > > Regards, > > > -- > View this message in context: > http://r.789695.n4.nabble.com/number-of-rules-tp2065030p2065030.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > 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. > ______________________________________________ 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.