title: How to deal with nonstandard column names (white space, punctuation, starts with numbers)
body: <pre><code>df &lt;- structure(list(`a a` = 1:3, `a b` = 2:4), .Names = c("a a", "a b"
  ), row.names = c(NA, -3L), class = "data.frame")
  </code></pre>
  
  <p>and the data looks like</p>
  
  <pre><code>  a a a b
  1   1   2
  2   2   3
  3   3   4
  </code></pre>
  
  <p>Following call to select</p>
  
  <pre><code>select(df, 'a a')
  </code></pre>
  
  <p>gives</p>
  
  <pre><code>Error in abs(ind[ind &lt; 0]) : 
    non-numeric argument to mathematical function
  </code></pre>
  
  <p>How can I select "a a" and/or rename it to something without space using <code>select</code>? I know the following approaches:</p>
  
  <ol>
  <li><code>names(df)[1] &lt;- "a"</code></li>
  <li><code>select(df, a=1)</code></li>
  <li><code>select(df, ends_with("a"))</code></li>
  </ol>
  
  <p>but if I am working on a large data set, how can I get an exact match without knowing the index numer or similar column names?</p>