title: Creating new matrix from output values of a function in r?
body: <p>Hi I have made a function Get to calculate the mean and SD from a data set, I have seven data sets of the same format and want to put the output  applying the Get function to these data sets in one matrix to compare. I know I need one more step in my function but cannot figure it out? Also id there away to loop this over each data set automatically if the names are CA1, CA2, ...? I am new to R</p>
  
  <p>This is the function </p>
  
  <pre><code> Get &lt;- function (x) {
    x &lt;- as.matrix(x)
    m &lt;- mean(x[,3:4])
    SD &lt;- sd(x[,3:4])
    return(list(mean=m, SD=SD))
  }
  </code></pre>