title: Carc data from rda file to numeric matrix
body: <p>I  try to make KDA (Kernel discriminant analysis) for carc data, but when I call command <code>X&lt;-data.frame(scale(X));</code> r shows error:</p>
  
  <pre><code>"Error in colMeans(x, na.rm = TRUE) : 'x' must be numeric"
  </code></pre>
  
  <p>I tried to use <code>as.numeric(as.matrix(carc))</code> and <code>carc&lt;-na.omit(carc)</code>, but it does not help either</p>
  
  <pre><code>library(ks);library(MASS);library(klaR);library(FSelector)
  install.packages("klaR")
  install.packages("FSelector")
  library(ks);library(MASS);library(klaR);library(FSelector)
  attach("carc.rda")
  data&lt;-load("carc.rda")
  data
  carc&lt;-na.omit(carc)
  head(carc)
  class(carc) # check for its class 
  class(as.matrix(carc)) # change class, and 
  as.numeric(as.matrix(carc))
  XX&lt;-carc
  X&lt;-XX[,1:12];X.class&lt;-XX[,13];
  X&lt;-data.frame(scale(X));
  fit.pc&lt;-princomp(X,scores=TRUE);
  plot(fit.pc,type="line")
  X.new&lt;-fit.pc$scores[,1:5]; X.new&lt;-data.frame(X.new);
  cfs(X.class~.,cbind(X.new,X.class))
  X.new&lt;-fit.pc$scores[,c(1,4)]; X.new&lt;-data.frame(X.new);
  fit.kda1&lt;-Hkda(x=X.new,x.group=X.class,pilot="samse",
  bw="plugin",pre="sphere")
  kda.fit1 &lt;- kda(x=X.new, x.group=X.class, Hs=fit.kda1)
  </code></pre>
  
  <p>Can you help to resolve this problem and make this analysis?</p>
  
  <p>Added:The car data set( Chambers, kleveland, Kleiner &amp; Tukey 1983)</p>
  
  <pre><code>&gt; head(carc)
                 P  M R78 R77   H    R Tr    W   L  T   D    G      C
  AMC_Concord 4099 22   3   2 2.5 27.5 11 2930 186 40 121 3.58     US
  AMC_Pacer   4749 17   3   1 3.0 25.5 11 3350 173 40 258 2.53     US
  AMC_Spirit  3799 22   .   . 3.0 18.5 12 2640 168 35 121 3.08     US
  Audi_5000   9690 17   5   2 3.0 27.0 15 2830 189 37 131 3.20 Europe
  Audi_Fox    6295 23   3   3 2.5 28.0 11 2070 174 36  97 3.70 Europe
  </code></pre>