title: Subset a list (choose matching values for all components)
body: <p>I try to read out certain elements from a list in a way, thats equivalent to <code>df[, c(1,4,5)]</code> in a <code>data.frame</code>.</p>
  
  <pre><code>&gt; obj &lt;- list(c(1:5), c(1:5))
  &gt; obj
  [[1]]
  [1] 1 2 3 4 5
  
  [[2]]
  [1] 1 2 3 4 5
  </code></pre>
  
  <p>Im looking for a result like this</p>
  
  <pre><code>[[1]]
  [1] 1 4 5
  
  [[2]]
  [1] 1 4 5
  </code></pre>
  
  <p>I have been experimenting with <code>[]</code>, <code>[[]]</code> and <code>[[]][]</code> but thats assessing the list componentwise.
  I've also been trying <code>lapply(obj, c(1,4,5))</code> and looking at <code>match()</code>.</p>
  
  <p>I'm not quite there yet, help would be appreciated.</p>
  
  <p>Thx!</p>