title: R - Apply function on multiple data frames
body: <p>I loaded several data sheets as data frames in R with:</p>
  <pre><code>temp = list.files(pattern=&quot;*.csv&quot;)
  for (i in 1:length(temp)) assign(temp[i], read.csv(temp[i]))
  </code></pre>
  <p>Now I would like to apply a function on all data frames.
  I thought about something like:</p>
  <pre><code>kappa1_mean_h_stem &lt;- lapply(df.list, mean_h_stem)
  </code></pre>
  <p>Where <code>df.list</code> contains a list of all data frames.</p>
  <pre><code>    mean_h_stem &lt;- function(x) {
    mean(x[1,3])
  }
  </code></pre>
  <p>I want the function to return the mean for a specific column. But it tells me, I had the wrong number of dimensions.</p>