title: Passing column name as parameter to a function using dplyr
body: <p>I have a dataframe like below :</p>
  
  <pre><code>transid&lt;-c(1,2,3,4,5,6,7,8)
  accountid&lt;-c(a,a,b,a,b,b,a,b)
  month&lt;-c(1,1,1,2,2,3,3,3)
  amount&lt;-c(10,20,30,40,50,60,70,80)
  transactions&lt;-data.frame(transid,accountid,month,amount)
  </code></pre>
  
  <p>I am trying to write function for total monthly amount for each accountid using dplyr package verbs.</p>
  
  <pre><code>my_sum&lt;-function(df,col1,col2,col3){
  df %&gt;% group_by_(col1,col2) %&gt;%summarise_(total_sum = sum(col3))
  }
  
  my_sum(transactions, "accountid","month","amount")
  </code></pre>
  
  <p>To get the result like below:</p>
  
  <pre><code>accountid   month  total_sum
  a            1       30
  a            2       40
  a            3       70
  b            1       30
  b            2       50
  b            3       140
  </code></pre>
  
  <p>I am getting error like:- Error in sum(col3) : invalid 'type' (character) of argument.How to pass column name as parameter without quote in summarise function?</p>