title: Create new vector with all elements between elements of two equal length vectors
body: <p>I am cleaning out interjections and heckles from the minutes of parliamentary sessions. I have transformed the PDF into a vector where each element contains one line of the minutes.</p>
  
  <p>Using regular expressions, I have identified the indices of the lines where an interjection starts (it begins with "(") and where it ends (it ends with ")"), resulting in two equal length vectors. </p>
  
  <p>To figure out now which lines to drop, I need to create a new vector that contains both the starting points and the end points, as well as all the lines in between.</p>
  
  <p>As an example:</p>
  
  <pre class="lang-r prettyprint-override"><code>start &lt;- c(1, 6, 9, 24)
  end &lt;- c(3, 7, 12, 27)
  </code></pre>
  
  <p>The resulting vector in this case should be equivalent to:</p>
  
  <pre class="lang-r prettyprint-override"><code>interjections &lt;- c(1,2,3,6,7,9,10,11,12,24,25,26,27)
  </code></pre>
  
  <p>or alternatively:</p>
  
  <pre class="lang-r prettyprint-override"><code>interjection &lt;- c(1:3, 6:7, 9:12, 24:27)
  </code></pre>
  
  <p>I am sure there is a simple way to do this, but I just cannot get it to work properly. Can someone help me out? Thanks!</p>