title: Replacing a vector of numbers by specific characters in a data.frame
body: <p>I have the following data:</p>
  <pre><code>df &lt;- data.frame(a = c(5,5,8,4,2,1,9,8,7,3,6)
  </code></pre>
  <p>I want add a new column to name the numbers based on the following:</p>
  <pre><code>names &lt;- c(1 = &quot;A&quot;, 2 = &quot;B&quot;, 3 = &quot;C&quot;, 4 = &quot;D&quot;, 5 = &quot;E&quot;, 
  6 = &quot;F&quot;, 7 = &quot;G&quot;, 8 = &quot;H&quot;, 9 = &quot;I&quot;, 10 = &quot;J&quot;, 11 = &quot;K&quot;)
  </code></pre>
  <p>The desired output is:</p>
  <pre><code>   a  b
  1  5  E
  2  5  E
  3  8  H
  4  4  D
  5  2  B
  6  1  A
  7  9  I
  8  8  H
  9  7  G
  10 3  C
  11 6  F
  </code></pre>