title: Converting counts into individual observations
body: <p>In my head this seems a simple aim, but i am struggling to find a solution.</p>
  <p>My data is laid out like this:</p>
  <pre><code>df &lt;- data.frame(species = c(&quot;A&quot;, &quot;B&quot;, &quot;C&quot;),
                   length= c(2, 3, 1),
                   count = c(4, 6, 1),
                   year=c(2008,2012,2008))
                  
  #  species length count  year
  #1       A      2     4  2008
  #2       B      3     6  2012
  #3       C      1     1  2008
  </code></pre>
  <p>I would like to duplicate rows based on the value in count. So my data set would look like this. I dont want to drop anything other than the count column of course.</p>
  <pre><code>#  species length  year
  #1       A      2  2008
  #2       A      2  2008
  #3       A      2  2008
  #4       A      2  2008
  
  </code></pre>
  <p>I hope that makes sense.</p>