title: dplyr::n() returns "Error: This function should not be called directly"
body: <p>If I do:</p>
  
  <pre><code>dplyr::mutate(MeanValue = mean(RSSI), ReadCount = n())
  </code></pre>
  
  <p>everything works fine.
  But when I try to qualify the function:</p>
  
  <pre><code>dplyr::mutate(MeanValue = mean(RSSI), ReadCount = dplyr::n())
  </code></pre>
  
  <p>I get the error mentioned in the title.</p>
  
  <p>So, I do not really have a problem, I can just avoid doing that, but I'm curious about why it even happens. I already looked at another question (<a href="https://stackoverflow.com/questions/22801153/dplyr-error-in-n-function-should-not-be-called-directly?noredirect=1&amp;lq=1">dplyr: &quot;Error in n(): function should not be called directly&quot;</a>), but as far as I know, dplyr is the only library I'm using. I tried doing what the answer suggests anyway, but</p>
  
  <pre><code>detach(package:plyr)
  </code></pre>
  
  <p>results in </p>
  
  <blockquote>
    <p>Error in detach(package:plyr) : invalid 'name' argument
    and</p>
  </blockquote>
  
  <pre><code>conflicts()
  </code></pre>
  
  <p>does not mention n():</p>
  
  <blockquote>
    <p>[1] "filter"    "lag"       "body&lt;-"    "intersect" "kronecker" "setdiff"   "setequal"  "union"<br>
    , most of which is cause by dplyr.</p>
  </blockquote>
  
  <p>I guess I'm not the only one confused by this?</p>