title: Boxplot - accessing column names with variables
body: <p>How can I access a column by using a variable that contains the name of the column?</p>
  
  <p>Let's assume we have a data frame DF with 3 columns: 
  <strong>Var1  Var2  Var3</strong>, where 
  Var3 contains numerical data and Var1 as well as Var2 contain a few factors. </p>
  
  <p>We would like to produce 2 boxplots using a temporary variable that contains the name of the column:</p>
  
  <pre><code>temp&lt;-"Var3"
  boxplot(DF[temp]) #(&lt;--that works).
  </code></pre>
  
  <p>If I use the same method to obtain a boxplot for each factor in Var2, it doesn't:</p>
  
  <pre><code>boxplot(DF[temp]~DF$Var2) #(&lt;-- does not work).
  </code></pre>
  
  <p>How can I get this working?</p>
  
  <p>Annotation:
  If I use the name "Var3" directly, it does work and shows several boxplots:</p>
  
  <p><code>boxplot(DF$Var3~DF$Var2)</code>. </p>