title: Error with dplyr group_by
body: <p>This is my dataset</p>
  
  <pre><code>N  Pl
  
  10, WO
  20, EI
  10, WO
  20, WO
  30, EI
  </code></pre>
  
  <p>My expected output is </p>
  
  <pre><code>N   Pl
  10,  2
  20,  1
  30,  1 
  </code></pre>
  
  <p>So, basically, I am counting number of pl with each value at N</p>
  
  <p>I am trying dplyr. I know probably this can also be done with aggregate() but I am not sure how to do with that. So in dplyr I am running this statement and getting the following error</p>
  
  <p>Statement:</p>
  
  <pre><code>Diff %&gt;% group_by(N) %&gt;% summarise(pl=count(pl))
  </code></pre>
  
  <p>Here <code>Diff</code> is my table name</p>
  
  <pre><code>Error in UseMethod("group_by_") : no applicable method for 'group_by_' applied to an object of class "c('integer', 'numeric')"
  </code></pre>
  
  <p>I am not sure how to do that. Any help will be appreciated. Also I have only basic knowledge of R</p>