title: How to get the nth element of each item of a list, which is itself a vector of unknown length
body: <p>If we have a list, and each item can have different length. For example: </p>
  
  <pre><code>l &lt;- list(c(1, 2), c(3, 4,5), c(5), c(6,7))
  </code></pre>
  
  <p>(In order to be clear, we will call objects in a list "items", and objects in the objects of list "elements".)</p>
  
  <p>How can we extract, for example the first element of each item? Here, I want to extract: </p>
  
  <pre><code>1, 3, 5, 6
  </code></pre>
  
  <p>Then same question for the second element of each item:</p>
  
  <pre><code>2, 4, NA, 7
  </code></pre>