title: predict.svm does not predict new data
body: <p>unfortunately I have problems using predict() in the following simple example:</p>
  
  <pre><code>library(e1071)
  
  x &lt;- c(1:10)
  y &lt;- c(0,0,0,0,1,0,1,1,1,1)
  test &lt;- c(11:15)
  
  mod &lt;- svm(y ~ x, kernel = "linear", gamma = 1, cost = 2, type="C-classification")
  
  predict(mod, newdata = test)
  </code></pre>
  
  <p>The result is as follows:</p>
  
  <pre><code>&gt; predict(mod, newdata = test)
     1    2    3    4 &lt;NA&gt; &lt;NA&gt; &lt;NA&gt; &lt;NA&gt; &lt;NA&gt; &lt;NA&gt; 
     0    0    0    0    0    1    1    1    1    1 
  </code></pre>
  
  <p>Can anybody explain why predict() only gives the fitted values of the training sample (x,y) and does not care about the test-data?</p>
  
  <p>Thank you very much for your help!</p>
  
  <p>Richard</p>