title: Selecting multiple columns in data frame using partial column name
body: <p>I have a data frame, DF, and the column names all contain color names:</p>
  
  <pre><code>red_balloons green_balloons red_balls blue_balls green_hats red_horses yellow_things
  </code></pre>
  
  <p>What I would like to do is select multiple columns based on more than one color name. I can select one column at a time like this:</p>
  
  <pre><code>grep("red", colnames(DF))
  </code></pre>
  
  <p>But I cannot figure out or find out how to select multiple columns. I tried this:</p>
  
  <pre><code>grep(c("red", "blue"), colnames(DF))
  </code></pre>
  
  <p>But got the following warning:</p>
  
  <pre><code>Warning message:
  In grep(c("mean()", "std()"), colnames(L21), value = FALSE) :
     argument 'pattern' has length &gt; 1 and only the first element will be used
  </code></pre>
  
  <p>Suggestions?</p>