title: how to add a new column to each dataset in a list
body: <p>I have looked at some similar questions but they haven't really helped.</p>
  
  <p>I have a list with 4 datasframes and I would like to add a column to each of the 4 dataframes.</p>
  
  <p>below are a few of the commands that I've tried.
  they all just result in a list of 4 vectors (just the diversity).</p>
  
  <pre><code>abundance_tables&lt;-lapply(abundance_tables,function(tab) tab$diversity&lt;-diversity(tab) )
  abundance_tables&lt;-mapply(function(tab) tab$diversity&lt;-diversity(tab),abundance_tables,SIMPLIFY = F )
  </code></pre>
  
  <p>any help is appreciated.</p>
  
  <p>thanks</p>