title: get coefficients of cross-validated glmnet model in caret
body: <p>How do I get coefficients of cross-validated glmnet model in R's caret package?</p>
  
  <pre><code>library(caret)
  x = matrix(rnorm(500), ncol=10)
  y = rnorm(100)
  control = trainControl(
           method="LOOCV",
           allowParallel = TRUE,
           number = nrow(sample_df), 
           verboseIter = FALSE,
           returnData = FALSE
          )
  
    my_elasticnet &lt;- train(x, y,
                       method = "glmnet",
                       preProc = c("center", "scale"),
                       trControl = control)
  </code></pre>