title: Renaming multiple columns in R
body: <p>I hope this is not a duplicate question as I could not find an answer I was interested in using. I have 70 columns and I want to rename them. I know several approaches as an example:</p>
  
  <pre class="lang-rb prettyprint-override"><code>df1&lt;-setmames (df1, c("BA1", "MA2", "NA3"...), c( "AB1","QB2","Q3"...))
  </code></pre>
  
  <p>But these approaches are not helpful as we have a very large scripts. I wonder if we could do it with a small script using <code>tidyverse</code>?</p>
  
  <p>Just as an example I can show three columns, assuming I have this table:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>AB1 AB2 AB3
  12 13 13
  12 13 13
  12 11 13
  12 13 17
  12 13 16</code></pre>
  </div>
  </div>
  </p>
  
  <p>I want to get this table</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>MZ1 MZ2 MZ3
  12 13 13
  12 13 13
  12 11 13
  12 13 17
  12 13 16</code></pre>
  </div>
  </div>
  </p>
  
  <p>Considering this is just an example , I have 70 columns. </p>