title: Extract vectors from strsplit list without using a loop
body: <p>Considering the following vector:</p>
  
  <pre><code>[1] "1-1694429" "2-1546669" "3-928598"  "4-834486"  "5-802353"  "6-659439"  "7-552850" 
  "8-516804"  "9-364061" 
  [10] "10-354181" "11-335154" "12-257915" "13-251310" "14-232313" "15-217628" "16-216569"   
  </code></pre>
  
  <p>I am trying to generate two vectors, each of them containing the values obtained by splitting each element of the vector by the delimiter "-".</p>
  
  <p>I used:</p>
  
  <pre><code>f &lt;- function(s) strsplit(s, "-")
  cc&lt;-sapply(names.reads, f)
  </code></pre>
  
  <blockquote>
    <p>head(cc)
        $<code>1-1694429</code>
        [1] "1"       "1694429"</p>
  </blockquote>
  
  <pre><code>$`2-1546669`
  
  [1] "2"       "1546669"
  </code></pre>
  
  <p>I know I can access them like:</p>
  
  <pre><code>&gt; cc[[1]][1]
  [1] "1"
  
  &gt; cc[[1]][2]
  [1] "1694429"
  </code></pre>
  
  <p>I would like to have two vectors , each one containing the values stored at  <code>cc[[i]][1]</code> and <code>cc[[i]][2]</code>...Can I do that without using a loop? (I have over 1 million elements )</p>