title: Error: invalid subscript type 'list' in R
body: <p>Having an issue here - I'm creating a function using the eclipse parameter to deal with a varying function parameters. I recreated as similar situation to show the issue I keep bumping into, </p>
  
  <pre><code>&gt; d &lt;- data.frame(alpha=1:3, beta=4:6, gamma=7:9)
  &gt; d
    alpha beta gamma
  1     1    4     7
  2     2    5     8
  3     3    6     9
  
  &gt; x &lt;- list("alpha", "beta")
  &gt; rowSums(d[,c(x)])
  Error in .subset(x, j) : invalid subscript type 'list'
  </code></pre>
  
  <p>How do I deal with the issue of feeding a list into a subset call? </p>