title: How do I extract values from uniform list in R?
body: <p>For example, how do I get a vector of each and every person's age in the list <code>people</code> below:</p>
  
  <pre><code>&gt; people = vector("list", 5)
  &gt; people[[1]] = c(name="Paul", age=23)
  &gt; people[[2]] = c(name="Peter", age=35)
  &gt; people[[3]] = c(name="Sam", age=20)
  &gt; people[[4]] = c(name="Lyle", age=31)
  &gt; people[[5]] = c(name="Fred", age=26)
  &gt; ages = ???
  &gt; ages
  [1] 23 35 20 31 26
  </code></pre>
  
  <p>Is there an equivalent of a Python list comprehension or something to the same effect?</p>