title: Rename multiple dataframe columns, referenced by current names
body: <p>I want to rename some random columns of a <strong>large</strong> data frame and I want to use the current column names, not the indexes. Column indexes might change if I add or remove columns to the data, so I figure using the existing column names is a more stable solution.
  This is what I have now:</p>
  
  <pre><code>mydf = merge(df.1, df.2)
  colnames(mydf)[which(colnames(mydf) == "MyName.1")] = "MyNewName"
  </code></pre>
  
  <p>Can I simplify this code, either the original <code>merge()</code> call or just the second line? <code>"MyName.1"</code> is actually the result of an xts <code>merge</code> of two different xts objects.</p>