title: results from lm using caret train
body: <p>I am using the caret R package as an extremely convenient wrapper for modeling. Although this is an odd use, I am having some trouble extracting results from a model when using model type = &quot;lm&quot;, and cross-validation of &quot;none&quot;. See below for example:</p>
  <pre><code>library(caret)
  ## Make data
  Xs &lt;- matrix(rnorm(300*20), nrow = 300, ncol = 20)
  Yvec &lt;- rnorm(300)
  ## Make traincontrol, cv of &quot;none&quot;
  tcontrol &lt;- trainControl(method = &quot;none&quot;)
  ## Fit lm model using train
  fit &lt;- train(x= Xs, y = Yvec, method = &quot;lm&quot;, metric = &quot;RMSE&quot;, trControl = tcontrol)
  
  fit$results
  [1] RMSE      Rsquared  parameter
  &lt;0 rows&gt; (or 0-length row.names)
  </code></pre>
  <p>Any ideas why the fit$results are empty? For all other models and cv types this seems to work. e.g. using 2-fold CV:</p>
  <pre><code>tcontrol2 &lt;- trainControl(method = &quot;cv&quot;, number = 2)
  fit2      &lt;- train(x= Xs, y = Yvec, method = &quot;lm&quot;, metric = &quot;RMSE&quot;, trControl = tcontrol2)
  fit2$results
    parameter     RMSE     Rsquared      RMSESD   RsquaredSD
  1      none 1.023666 0.0008921194 0.006499062 0.0003463973
  </code></pre>
  <p>I appreciate that this is a contrived example, but this model and cv method is just one combination of a much larger number that I am testing (and so the caret wrapper is ideal).</p>