title: charcter vector error when using vars function to rename columns in dplyr
body: <p>I am trying to take financial data that has dates and create a summary table.  In doing so, I transform the data to wide format and then want to rename the resulting new columns since they otherwise will show up as dates.</p>
  
  <p>I believe I am providing a character vector to "vars" when using "rename_at", but it is throwing an error and I am stuck as to why.  I found this link here as an example of how to rename multiple columns <a href="https://stackoverflow.com/questions/44452108/rename-multiple-columns-given-character-vectors-of-column-names-and-replacement">rename example</a></p>
  
  <p>The desired output would look like this:</p>
  
  <p><a href="https://i.stack.imgur.com/r3MQk.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/r3MQk.jpg" alt="enter image description here"></a></p>
  
  <p><strong>Reproducible example</strong></p>
  
  <pre><code>library(tidyverse)
  library(lubridate)
  
  # data
  my_dates &lt;- as.Date(c("2018-05-25", "2018-08-25", "2018-11-25", "2018-05-25", "2018-08-25", "2018-11-25"))
  item     &lt;- c("A","A","A","B","B","B")
  value    &lt;- c(50:55)
  
  df &lt;- data.frame(my_dates, item, value)
  
  # Dates will become column names and coerced as characters, so need way to refer to them
  my_colnames  &lt;- as.character(sort(my_dates, decreasing = TRUE))
  
  # New column names
  new_colnames &lt;- c("current", "3M_ago", "6M_ago")
  
  # convert to wide format
  df_wide &lt;- df %&gt;%
      spread(key = my_dates, value) %&gt;%
      select(item, my_colnames) %&gt;%
      rename_at(vars(my_colnames) ~ new_colnames)  # throws error here
  </code></pre>
  
  <p>Thanks in advance for the help!</p>