title: How to change multiple column names at one time?
body: <p>I am trying to change three column names of a data frame at one time.</p>
  
  <p>When I worked with one column name change, my code worked well:  </p>
  
  <pre><code>    names(df)[names(df)== "name1")] &lt;- "name12"  
  </code></pre>
  
  <p>But when I tried to change three column names in one command, error occurred:  </p>
  
  <pre><code>    names(df)[names(df)= c("name1, "name2", "name3")] &lt;- c("name12", "name22", "name32")  
  </code></pre>
  
  <p>I would be grateful if anyone could help.</p>