title: Renaming multiple columns from vector in dplyr chain
body: <p>I have a dataframe that I would like to rename several columns with similar name conventions (e.g., starts with "X") and/or column positions (e.g., 4:7). The new names of the columns are stored in a vector. How do I rename this columns in a <code>dplyr</code> chain?</p>
  
  <pre><code># data
  df &lt;- tibble(RID = 1,Var1 = "A", Var2 = "B",old_name1 =4, old_name2 = 8, old_name3=20)
  new_names &lt;- c("new_name1","new_name2","new_name3")
  
  #psuedo code
  df %&gt;%
    rename_if(starts_with('old_name'), new_names)
  </code></pre>