title: Rename column R
body: <p>I am trying to rename columns but I do not know if that column will be present in the dataset. I have a large data set and if a certain column name is present I want to rename it. For example:</p>
  
  <pre><code>A   B   C   D   E
  1   4   5   9   2
  3   5   6   9   1
  4   4   4   9   1
  
  newNames &lt;- data %&gt;% rename(1=A,2=B,3=C,4=D,5=E)
  </code></pre>
  
  <p>This works to rename what is in the dataset but I am looking for the flexibility to add more potential name changes, without an error occurring.</p>
  
  <pre><code>newNames2 &lt;- data %&gt;% rename(1=A,2=B,3=C,4=D,5=E,6=F,7=G)
  </code></pre>
  
  <p>This ^ will not work it give me an error because F and G are not in the data set. </p>
  
  <p>Is there any way to write a code to ignore the column change if the name does not exist?
  Thanks!</p>