title: Modify the content of a dataframe in R
body: <p>I would like to transform/modify the content of dataframe. Basically I have a dataframe like below: </p>
  
  <pre><code>        bins      pval
  1   2L:1:150 0.9224217
  2 2L:151:300 0.9478824
  3 2L:301:450 0.9671139
  4 2L:451:600 0.9280847
  5 2L:601:750 0.9698584
  6 2L:751:900 0.9725379
  </code></pre>
  
  <p>And I would like to transform/modify into another dataframe like this, where I split the content of my "bins" column (first row) into 150 rows containing the same values. And so on for the second row. </p>
  
  <pre><code>    chr  pos    pval
  1   2L   1 0.9224217
  2   2L   2 0.9224217
  3   2L   3 0.9224217
  4   2L   4 0.9224217
  5   2L   5 0.9224217
  ...
  150  2L   150 0.9224217
  151  2L   151 0.9478824
  152  2L   152 0.9478824
  153  2L   153 0.9478824
  etc...
  </code></pre>
  
  <p>Any help much appreciated, </p>
  
  <p>Ben</p>