title: sapply() with strsplit in R
body: <p>I found this code:</p>
  
  <pre><code>string = c("G1:E001", "G2:E002", "G3:E003")
  &gt; sapply(strsplit(string, ":"), "[", 2)
  [1] "E001" "E002" "E003"
  </code></pre>
  
  <p>clearly <code>strsplit(string, ":")</code> returns a vectors of size 3 where each component i is a vector of size 2 containing <code>Gi</code> and <code>E00i</code>.</p>
  
  <p>But why the two more arguments <code>"[", 2</code> have the effect to select only those <code>E00i</code>? As far as I see the only arguments accepted by the function are:</p>
  
  <pre><code>sapply(X, FUN, ..., simplify = TRUE, USE.NAMES = TRUE) 
  </code></pre>