title: R caret Error: Something is wrong; all the Accuracy metric values are missing:
body: <p>I'm trying to apply stacking on my dataset but here I am.</p>
  
  <pre><code># Load library
  library(DJL)
  library(caret)
  library(caretEnsemble)
  
  # Load data and format the target attribute to avoid clutters
  df &lt;- dataset.engine.2015[, -c(1, 2)]
  levels(df$Type) &lt;- list(NA.D = "NA-D", NA.P = "NA-P", SC.P = "SC-P", TC.D = "TC-D", TC.P = "TC-P")
  
  # Run
  st.methods &lt;- c("lda", "rpart", "glm", "knn", "svmRadial")
  st.control &lt;- trainControl(method = "repeatedcv", number = 5, repeats = 3, 
                             savePredictions = T, classProbs = T)
  st.models  &lt;- caretList(Type ~., data = df, trControl = st.control, methodList = st.methods)
  </code></pre>
  
  <p>Then I get this:</p>
  
  <pre><code>Something is wrong; all the Accuracy metric values are missing:
      Accuracy       Kappa    
   Min.   : NA   Min.   : NA  
   1st Qu.: NA   1st Qu.: NA  
   Median : NA   Median : NA  
   Mean   :NaN   Mean   :NaN  
   3rd Qu.: NA   3rd Qu.: NA  
   Max.   : NA   Max.   : NA  
   NA's   :1     NA's   :1    
  Error: Stopping
  In addition: There were 18 warnings (use warnings() to see them)
  </code></pre>
  
  <p>Can anyone help me to fix this error?</p>