title: How to get values from a list?
body: <p>I have a list with uniform size as below. I want to extract the values for the keys. How do I do it?</p>
  
  <p>I have isolated the keys by using <code>names(allsum)</code> where <code>allsum</code> looks like this</p>
  
  <pre><code>`$1999
  [1] 7332967
  
  $2002
  [1] 5635780
  
  $2005
  [1] 5454703
  
  $2008
  [1] 3464206`
  </code></pre>
  
  <p>I want <code>[7332967, 5635780, 5454703, 3464206]</code> as the output. I tried <code>sapply</code> but have a weak intuition. Please help.</p>
  
  <pre><code>for(a in allsum) {
    print(a[[1]])
  }
  </code></pre>
  
  <p>I tried this, it works, but I want to know if we can do it with some function or without any explicit looping.</p>
  
  <p>I tried using <code>unlist</code>
  Following is what happens  </p>
  
  <pre><code>c1 &lt;- unlist(allsum) 
   #1999    2002    2005    2008 
  #7332967 5635780 5454703 3464206
  </code></pre>
  
  <p>I just need the big numbers. How do I extract?</p>