Running examples in ‘RWeka-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: Weka_classifier_trees
> ### Title: R/Weka Classifier Trees
> ### Aliases: Weka_classifier_trees J48 LMT M5P DecisionStump plot.Weka_tree
> ###   parse_Weka_digraph
> ### Keywords: models regression classif tree
> 
> ### ** Examples
> 
> m1 <- J48(Species ~ ., data = iris)
> 
> ## print and summary
> m1
J48 pruned tree
------------------

Petal.Width <= 0.6: setosa (50.0)
Petal.Width > 0.6
|   Petal.Width <= 1.7
|   |   Petal.Length <= 4.9: versicolor (48.0/1.0)
|   |   Petal.Length > 4.9
|   |   |   Petal.Width <= 1.5: virginica (3.0)
|   |   |   Petal.Width > 1.5: versicolor (3.0/1.0)
|   Petal.Width > 1.7: virginica (46.0/1.0)

Number of Leaves  : 	5

Size of the tree : 	9

> summary(m1) # calls evaluate_Weka_classifier()

=== Summary ===

Correctly Classified Instances         147               98      %
Incorrectly Classified Instances         3                2      %
Kappa statistic                          0.97  
Mean absolute error                      0.0233
Root mean squared error                  0.108 
Relative absolute error                  5.2482 %
Root relative squared error             22.9089 %
Total Number of Instances              150     

=== Confusion Matrix ===

  a  b  c   <-- classified as
 50  0  0 |  a = setosa
  0 49  1 |  b = versicolor
  0  2 48 |  c = virginica
> table(iris$Species, predict(m1)) # by hand
            
             setosa versicolor virginica
  setosa         50          0         0
  versicolor      0         49         1
  virginica       0          2        48
> 
> ## visualization
> ## use partykit package
> if(require("partykit", quietly = TRUE)) plot(m1)
> ## or Graphviz
> write_to_dot(m1)
digraph J48Tree {
N0 [label="Petal.Width" ]
N0->N1 [label="<= 0.6"]
N1 [label="setosa (50.0)" shape=box style=filled ]
N0->N2 [label="> 0.6"]
N2 [label="Petal.Width" ]
N2->N3 [label="<= 1.7"]
N3 [label="Petal.Length" ]
N3->N4 [label="<= 4.9"]
N4 [label="versicolor (48.0/1.0)" shape=box style=filled ]
N3->N5 [label="> 4.9"]
N5 [label="Petal.Width" ]
N5->N6 [label="<= 1.5"]
N6 [label="virginica (3.0)" shape=box style=filled ]
N5->N7 [label="> 1.5"]
N7 [label="versicolor (3.0/1.0)" shape=box style=filled ]
N2->N8 [label="> 1.7"]
N8 [label="virginica (46.0/1.0)" shape=box style=filled ]
}

> ## or Rgraphviz
> ## Not run: 
> ##D library("Rgraphviz")
> ##D ff <- tempfile()
> ##D write_to_dot(m1, ff)
> ##D plot(agread(ff))
> ## End(Not run)
> 
> ## Using some Weka data sets ...
> 
> ## J48
> DF2 <- read.arff(system.file("arff", "contact-lenses.arff",
+                              package = "RWeka"))
> m2 <- J48(`contact-lenses` ~ ., data = DF2)
Error in `[.data.frame`(mf, , sub("^`(.*)`$", "\\1", varnms), drop = FALSE) : 
  undefined columns selected
Calls: J48 ... RWeka_build_classifier -> .compose_and_funcall -> flist -> [ -> [.data.frame
Execution halted