title: unexpected result of eval parse
body: <p>I have a set of identically dimensioned tables for 322 areas. I need to sum these tables to 29 higher level areas and where each higher level area has varying numbers of the lower level area.</p>
  <p>I am proposing to compute the sum in a loop, so the first task is to determine the number of lower level areas to be summed (each of which have character identifiers).</p>
  <p>So for example the first list of lower level areas is a list of four:</p>
  <pre><code>lad_list_black
  [1] &quot;00CW&quot; &quot;00CU&quot; &quot;00CS&quot; &quot;00CR&quot;
  </code></pre>
  <p>The higher area lists are differentiated by the last term -- in this case &quot;black&quot;. The next is &quot;bucks&quot; (ie lad_list_bucks), etc.</p>
  <h3></h3>
  <p>I was proposing to use a loop which counted the number of lower level areas in its first step -- something like</p>
  <pre><code>nam &lt;- c(&quot;black&quot;,&quot;bucks&quot;)
  
  lad_list_black &lt;- c(&quot;00CW&quot;,&quot;00CU&quot;,&quot;00CS&quot;,&quot;00CR&quot;)
  
  for(i in 1:1){
  eval(parse(text=length(paste(&quot;lad_list_&quot;,nam[i],sep=&quot;&quot;))))}
  </code></pre>
  <p>but when I tested it outside the loop, the result was:</p>
  <pre><code>eval(parse(text=length(paste(&quot;lad_list_&quot;,nam[1],sep=&quot;&quot;))))
  [1] 1
  </code></pre>
  <p>which is not correct, since:</p>
  <pre><code>length(lad_list_black)
  [1] 4
  </code></pre>