title: How to rename variables that have similar names and code in R?
body: <p>I have a list in csv format of different names with the same underlying code below:</p>
  
  <pre><code>Code       Name
  
  25000      James John Junior
  
  RA25000    James Junior
  
  RA2500009  James J. Junior
  
  RA27000       Bill Hope
  
  RA2800009   Donna Scott
  
  28000            Donna Love Scott
  </code></pre>
  
  <p>Since the list shares the same underlying code 25000 and 28000, how can I change the list to have the same name James John Junior, the name associated with 25000, and Donna Love Scott, the name associated with 28000, as shown below (in R):</p>
  
  <pre><code>Code       Name
  
  25000          James John Junior
  
  RA25000       James John Junior
  
  RA2500009  James John Junior
  
  RA27000       Bill Hope
  
  RA2800009   Donna Love Scott
  
  28000            Donna Love Scott
  </code></pre>