title: R count function
body: <p>I am using the <em>dplyr</em> package to count the frequency of values in one of my columns. I previously used the below code and it was working fine until today.</p>
  <pre><code>library(dplyr)
  
  df = data.frame(id = c(1,2,3,4,5,6), Leaver = c(&quot;Leaver&quot;, &quot;Leaver&quot;,&quot;Non-Leaver&quot;,&quot;Leaver&quot;,&quot;Non-Leaver&quot;,&quot;Leaver&quot;), office = c(1,1,3,2,3,1))
  
  count(df, &quot;Leaver&quot;)
  </code></pre>
  <p>This returns the following:</p>
  <pre><code># A tibble: 1 x 2
  '&quot;Leaver&quot;'     n
  &lt;chr&gt;      &lt;int&gt;
  1 Leaver         6
  </code></pre>
  <p>And I want it to return:</p>
  <pre><code>Leaver        4
  Non-Leaver    2
  </code></pre>
  <p>I was using this count function last week as written above and it used to output the desired result. However, when rerunning my code this week, after making some changes to other fields, it is now outputting the over total.</p>
  <p>Why has this changed or how can I fix it?</p>