title: Error in caret-svm - "NAs are not allowed in subscripted assignments"
body: <p>experts. I am a beginner to R. I am trying to use caret-SVM to make classification. The kernel is svmPoly.
  First, I used the  default parameters to train the model with leave-one-out cross-validation
  The code is :</p>
  
  <pre><code>ctrl &lt;- trainControl(method = "LOOCV",
                       classProbs = T,
                       savePredictions = T,
                       repeats = 1)
  modelFit &lt;- train(group~.,data=table_svm,method="svmPoly",
                    preProc = c("center","scale"),
                    trControl = ctrl) 
  </code></pre>
  
  <p>The best accuracy is 80%. And the final values used for the model were degree = 1, scale = 0.1 and C = 1 .</p>
  
  <p>Second,  I tried to tune the parameters.
  The code is:</p>
  
  <pre><code>grid_svmpoly=expand.grid(degree=c(1:11),scale=seq(0,5,length.out=25),C=10^c(0:4)) 
  modelFit_tune &lt;- train(group~.,data=table_svm,method="svmPoly",
                    preProc = c("center","scale"),
                    tuneGrid=grid_svmpoly,
                    trControl = ctrl)
  </code></pre>
  
  <p>I got an error message: Error in { : 
    task 264 failed - "NAs are not allowed in subscripted assignments"</p>
  
  <p>I checked the data and found no NA.</p>