title: How to loop through data sets to graph particular columns only?
body: <p>The graph, I have down.
  The challenge is I have the _exact_same_code_ for graphing multiple data sets (rather, subsets of one LARGE data set), but I can't seem to get the looping code right to substitute the $ correctly.</p>
  
  <p>Data sets, df1, df2, df3... of the form:</p>
  
  <pre><code>OBSDATE     REGION  AVG_RESP  P10  P90
  2012-02-01  APAC    1.276     0.78 3.45
  2012-02-01  EMEA    2.341     1.23 5.67
  2012-02-02  APAC    1.343     0.89 3.21
  2012-02-02  EMEA    2.473     1.37 5.98
  </code></pre>
  
  <p>The graph is more complex, but like this:</p>
  
  <pre><code>avgMx &lt;- quantile(df1$P90,0.95)
  ggplot(df1,aes(x=OBSDATE,y=AVG_RESP))+coord_cartesian(ylim=c(0,avgMx))+geom_ribbon(aes(ymin=P10,ymax=P90),fill="gray60",alpha=0.33)+geom_line(aes(x=OBSDATE,y=AVG_RESP),color="#007DB1",size=0.5)+facet_wrap(~REGION)
  </code></pre>
  
  <p>if I define a vector or list (both seem to fail with the same error messages) with the data set names I can't get the loop to work to find any descriptive values (like the quantile above or even a max!)</p>
  
  <pre><code>filenames &lt;- c("df1","df2","df3")
  </code></pre>
  
  <p>I would like to get something like this to work</p>
  
  <pre><code>for (i in filenames) {
     quantile(i$AVG_RESP,0.95)
     max(i$AVG_RESP)
  }
  </code></pre>
  
  <p>But I get errors about $ is invalid for atomic vectors.  Upon investigation, that doesn't seem to yield any usable results.</p>
  
  <p>So, I can get this to work:</p>
  
  <pre><code>max(df1$AVG_RESP) or max(df1['AVG_RESP'])
  </code></pre>
  
  <p>they both would output 2.473 from above.  However, this doesn't fly:</p>
  
  <pre><code>for (i in pagesC) max(i['AVG_RESP'])
  </code></pre>
  
  <p>It does nothing.  Changing it to this:</p>
  
  <pre><code>for (i in pagesC) print(max(i['AVG_RESP']))
  </code></pre>
  
  <p>Gives instances of NA.</p>
  
  <p>I'm completely stuck.  Any help would be tremendously appreciated!</p>
  
  <p>EDIT: I fixed the data that was causing errors - should be reproducible now.</p>