title: How to remap multiple columns in data frame?
body: <p>I have a data frame:</p>
  <pre><code>df &lt;- as.data.frame(matrix(LETTERS[sample(1:5, 15, replace = TRUE)], 5, 3))
  df
    V1 V2 V3
  1  C  C  A
  2  C  D  B
  3  E  B  E
  4  D  D  C
  5  C  D  E
  </code></pre>
  <p>I want to remap all of its values according to the map, e.g. like this one:</p>
  <pre><code>map &lt;- data.frame(id = 1:5, value = LETTERS[1:5])
  map
    id value
  1  1     A
  2  2     B
  3  3     C
  4  4     D
  5  5     E
  </code></pre>
  <p>To get the output:</p>
  <pre><code>  V1 V2 V3
  1  3  3  1
  2  3  4  2
  3  5  2  5
  4  4  4  3
  5  3  4  5
  </code></pre>
  <p>I have managed to do that like that:</p>
  <pre><code>df_id &lt;- as.data.frame(sapply(df, recode, !!! setNames(map$id, map$value)))
  </code></pre>
  <p>...but it the slowest method on the planet when data frames are large.
  Any better way to do that?
  Thanks!</p>