title: R looping: to display numbers in an interval
body: <p>I have a dataset and I want to display the numbers for each row between col1 and col2 counted by col3 using R:</p>
  
  <pre><code>dataset=data.frame(col1=c(3,9,15), col2=c(4,11,16), col3=c(2,3,2))
  </code></pre>
  
  <p>My result should look like:</p>
  
  <pre><code>3
  3
  4
  4
  9
  9
  9
  10
  10
  10
  11
  11
  11
  15
  15
  16
  16
  </code></pre>
  
  <p>Seems trivial but I cannot get a for loop work. Thanks.</p>