title: Create a sequence from vectors with start and end positions
body: <p>Given two separate vectors of equal length: f.start and f.end, I would like to construct a sequence (by 1), going from <code>f.start[1]:f.end[1]</code> to <code>f.start[2]:f.end[2]</code>, ..., to <code>f.start[n]:f.end[n]</code>.</p>
  
  <p>Here is an example with just 6 rows.</p>
  
  <pre><code>   f.start  f.end
  [1,]   45739 122538
  [2,]  125469 202268
  [3,]  203563 280362
  [4,]  281657 358456
  [5,]  359751 436550
  [6,]  437845 514644
  </code></pre>
  
  <p>Crudely, a loop can do it, but is extremely slow for larger datasets (rows>2000).</p>
  
  <pre><code>f.start&lt;-c(45739,125469,203563,281657,359751,437845)
  f.end&lt;-c(122538,202268,280362,358456,436550,514644)
  f.ind&lt;-f.start[1]:f.end[1]
  for (i in 2:length(f.start))
  {
   f.ind.temp&lt;-f.start[i]:f.end[i]
   f.ind&lt;-c(f.ind,f.ind.temp)
  }
  </code></pre>
  
  <p>I suspect this can be done with apply(), but I have not worked out how to include two separate arguments in apply, and would appreciate some guidance.</p>