title: error in plot function (variable match was not found)
body: <p>i am trying to plot my decision tree, but it keeps giving me this error, and i can not figure out what is wrong.</p>
  <p>here's the code:</p>
  <pre><code>install.packages(&quot;foreign&quot;)
  library(&quot;foreign&quot;)
  install.packages(&quot;C50&quot;)
  library(C50)
  setwd(&quot;C:\\Users\\hp\\Music\\SefSec_2014_HH_weight new.sav&quot;)
  df &lt;- read.spss(&quot;C:\\Users\\hp\\Music\\SefSec_2014_HH_weight new.sav&quot;, to.data.frame = TRUE)
  View(df)
  summary(df)
  
  #summary(df$C12_21)
  
  
  controlFactor = C5.0Control(sample=0.7,seed=10,CF=0.25,winnow = TRUE ,minCases = 20)
  model = C5.0(df[,c(427,432,437,422,447,452,457,462,467,472,482,487,477,492,497,502,503,504,505,506,507,508)], df[,512], control = controlFactor) 
  na.omit(df)
  summary(model)
  plot(model,type=&quot;s&quot;,main=&quot;Descision Tree&quot;)
  </code></pre>
  <p>and here's the error:</p>
  <pre><code>&gt; plot(model,type=&quot;s&quot;,main=&quot;Descision Tree&quot;)
  Error in FUN(X[[i]], ...) : Variable match was not found.
  </code></pre>