title: How to use paste on column names from object?
body: <p>Suppose i have the following Db:</p>
  
  <pre><code>db&lt;-data.frame(para=c(round(rnorm(20,10,10),0)),sal1=c(rnorm(20,100,7)),sal2=c(rnorm(20,100,7)),sal3=c(rnorm(10,100,7)),sal4=rep(c("a","b"),5))
  
  para      sal1      sal2      sal3     sal4
  1    13 104.73988  96.53538 107.03285    a
  2     1  94.54826  88.79930 101.17248    b
  3    26 102.36344  94.83702  91.11708    a
  4    13  99.32913  95.90670  90.49470    b
  </code></pre>
  
  <p>Basically what i want:</p>
  
  <pre><code>paste(db$sal1,db$sal2,db$sal3, sep="-")
  para   sal1   sal2   sal3     sal4               newcol
  1     8 105.11 101.38 100.01    a 105.11-101.38-100.01
  2     2 109.55  88.98 104.12    b  109.55-88.98-104.12
  3    25 100.12 103.84 102.43    a 100.12-103.84-102.43
  4    15 105.22  90.95 100.67    b  105.22-90.95-100.67
  5    21  97.57  97.78 103.89    a   97.57-97.78-103.89
  6    -1 101.88 100.22  88.21    b  101.88-100.22-88.21
  7    12 104.20  95.26  93.72    a    104.2-95.26-93.72
  8    16 106.25 100.70  94.95    b   106.25-100.7-94.95
  9    24 101.36  97.91  99.67    a   101.36-97.91-99.67
  </code></pre>
  
  <p>Actually the way i want:</p>
  
  <pre><code>colnam&lt;-c("sal1","sal2","sal3")
  colnameful&lt;-paste0("db$",colnam)
  </code></pre>
  
  <p>paste using variable <code>colnameful</code></p>
  
  <p>Something like below i tried:</p>
  
  <pre><code>paste(colnameful, sep="-") # Useless
  </code></pre>
  
  <p>Please suggest, Thanks in advance.</p>