title: Sum a list of variables in R
body: <p>I am trying to sum up a list of variables.</p>
  
  <pre><code>qdisgust &lt;- c(2,3,5,8,12,17,18,22,23,25,28,29,31,33)
  vqdisgust &lt;- list()
  n    &lt;- length(qdisgust)
  lhs  &lt;- paste("mydata$Disgust_", qdisgust, sep="")
  eq   &lt;- paste("vqdisgust &lt;- c(lhs)")
  eval(parse(text=eq))
  </code></pre>
  
  <p>I sucessfully get all the variables in the list, but then am not able to get the sum of them. I assume there would be a way even simpler to do this.</p>
  
  <p>Thank you for your help!</p>