title: How can I get the p.value of all regressions using lapply function
body: <p>I am using an example, with mtcars, to later use it in the analysis of my data. I can get a list of summaries and the coef function on each regressions. My question is how can I get the p.value of all regressions in a list using lapply function? </p>
  
  <p>Here is my code</p>
  
  <pre><code>    library(data.table)
      regressions &lt;- 
      data.table(mtcars)[, 
            .(Myregressions = lapply(.SD, function(x) summary(lm(mpg ~ x)))), 
            .SDcols = -1]
  
  Regressions$MyRegressions
  Regressions[, lapply(MyRegressions, coef)]
  </code></pre>