title: How to append a string to subset of variable names in R?
body: <p>I am trying to alter a select few of my variable names in a data frame. How can I do this without typing each of the old names and each of the new names? I thought the code below might work but it hasn't. I am trying to append "Econ" to each of the existing names identified in the data frame.</p>
  
  <pre><code>    names(wb.misc)[3,13,14,20,22,47,61,62,64,68,73] &lt;- 
           paste("Econ", names(wb.misc)[3,13,14,20,22,47,61,62,64,68,73], sep = "-")
  </code></pre>