title: How to add a "1" to end of each variable name in R?
body: <p>I have a dataframe "data" with 50 variables. For the analysis purpose, I want to rename all these variables by adding 1 at the end of each variable . Following is the procedure that I followed (for a dataframe "datasample" of 10 variables): </p>
  
  <pre><code>names(datasample)
  # original colnames for 10 variables
  names(datasample)
    [1] "a"    "z"   "y"  "b"  "bb" "ca"   "a3"   
    [8] "b2" "as" "ask"
  #rename 10 variables
  names(datasample)&lt;-c("a1","z1","y1","b1","bb1","ca1","a31","b21","as1","ask1")
  </code></pre>
  
  <p>I was wondering whether there is an efficient way of renaming these multiple variables. Thanks in advance. </p>