title: SVM Is working on Training set but not on testing set in R
body: <p>I m using SVM for classification, I have devided my data set into two CSV file one is training set (70 % of data) and other is testing set (30 % of data).
  when i use predict on the trainig set i m getting answer but on testing set it shows error
   I m using e1071 package</p>
  
  <p>program as follow</p>
  
  <pre><code>Train &lt;- read.csv("Train.csv")
  Test &lt;- read.csv("Test.csv")
  
  x_Train &lt;- subset(Train,select=-Class)
  y_Train &lt;- Train$Class
  
  model &lt;- svm(Class ~., data=Train)
  
  
  pred=predict(model, x_Train) #working well
  table(pred,y_Train)  
  
  
   x_Test &lt;- subset(Test,select=-Class)
   y_Test &lt;- Test$Class
  
  pred &lt;- predict(model, x_Test) #getting_error
  
  Error in scale.default(newdata[, object$scaled, drop = FALSE], center =         object$x.scale$"scaled:center",  : 
  length of 'center' must equal the number of columns of 'x'
  </code></pre>
  
  <p>Will you please figure out wat could be the problem...?</p>