title: Recode from a long list of variables
body: <p>Using the example dataframe:</p>
  
  <pre><code>df &lt;- structure(list(KY27SCH1 = c(4, 4, 4, 4, NA, 5, 2, 4, 4, NA, 4, 
                                    5, 3, 5, 5), KY27SCH2 = c(5, 4, 4, 4, NA, 4, 1, 4, 4, NA, 4, 
                                                              5, 4, 5, 5), KY27SCH3 = c(4, 4, 5, 4, NA, 4, 4, 4, 5, NA, 5, 
                                                                                        5, 3, 5, 5), KY27SCH4 = c(3, 5, 5, 4, NA, 5, 4, 5, 5, NA, 5, 
                                                                                                                  5, 4, 5, 5)), .Names = c("KY27SCH1", "KY27SCH2", "KY27SCH3", 
                                                                                                                                           "KY27SCH4"), row.names = 197:211, class = "data.frame")
  </code></pre>
  
  <p>I apply a line of code to add the four different columns together before binding this new column to the original dataframe:</p>
  
  <pre><code>KC27sc_R &lt;- rowSums(df[, c("KY27SCH1", "KY27SCH2", "KY27SCH3", "KY27SCH4")], na.rm = TRUE)
  df &lt;- cbind(df, KC27sc_R) # Adds columns to survey dataframe
  </code></pre>
  
  <p>I then want to recode variable KC27sc_R using the table of results detailed below:</p>
  
  <pre><code>5= -4.287
  6 = -3.040
  7 = -2.405
  8 = -1.960
  9 = -1.605
  10 = -1.296
  11 = -1.011
  12 = -0.735
  13 = -0.456
  14 = -0.168
  15 = 0.134
  16 = 0.454
  17 = 0.796
  18 = 1.166
  19 = 1.574
  20 = 2.035
  21 = 2.582
  22 = 3.299 
  23 = 4.594
  </code></pre>
  
  <p>i.e. 5 in column KC27sc_R would become -4.287.</p>
  
  <p>Is there a way of recoding a column from a list of numbers without having to go through each number in turn?  I normally use the recode function but I am unsure how to do this with a large list.</p>
  
  <p>Any help would be appreciated. </p>