title: R List: How to get the length from a list stored in a key-value list?
body: <p>If I stored a list or vector in a key-value list, the list's length is 1 returned by length().  </p>
  
  <pre><code>&gt; i&lt;-c(0,1,2,3,4)
  &gt; length(i)
  [1] 5
  &gt; l &lt;- list( r=2, i=i)
  &gt; l["i"]
  $i
  [1] 0 1 2 3 4
  
  &gt; length(l["i"])
  [1] 1
  </code></pre>
  
  <p>Why? How to store a list or vector in a key-value list properly?</p>