title: Extracting specific columns from a data frame
body: <p>I have an R data frame with 6 columns, and I want to create a new dataframe that only has three of the columns.</p>
  
  <p>Assuming my data frame is <code>df</code>, and I want to extract columns <code>A</code>, <code>B</code>, and <code>E</code>, this is the only command I can figure out:</p>
  
  <pre><code> data.frame(df$A,df$B,df$E)
  </code></pre>
  
  <p>Is there a more compact way of doing this?</p>