title: Count non-NA values by group
body: <p>Here is my example</p>
  <pre><code>mydf&lt;-data.frame('col_1' = c('A','A','B','B'), 'col_2' = c(100,NA, 90,30))
  </code></pre>
  <p>I would like to group by <code>col_1</code> and count non-<code>NA</code> elements in <code>col_2</code></p>
  <p>I would like to do it with <code>dplyr</code>. Here is what I tried:</p>
  <pre><code>mydf %&gt;% group_by(col_1) %&gt;% summarise_each(funs(!is.na(col_2)))
  mydf %&gt;% group_by(col_1) %&gt;% mutate(non_na_count = length(col_2, na.rm=TRUE))
  mydf %&gt;% group_by(col_1) %&gt;% mutate(non_na_count = count(col_2, na.rm=TRUE))
  </code></pre>
  <p>Nothing worked. Any suggestions?</p>