title: My modified version of package function can't find the package's other internal functions
body: <p>I made some ad hoc modifications to a function in the package <code>metafor</code> by copying the function code from Github and replacing the function in my environment <a href="https://stackoverflow.com/questions/6254744/override-a-function-that-is-imported-in-a-namespace">as described here</a>:</p>
  
  <pre><code>my.rma.uni = function(...) {
  # here I simply copied the existing code with no modifications as a test
  }
  
  unlockBinding("rma.uni", as.environment("package:metafor"))
  assign("rma.uni", rma.uni_mm, as.environment("package:metafor"))
  lockBinding("rma.uni", as.environment("package:metafor"))
  </code></pre>
  
  <p>But when I try to now to run <code>rma.uni</code>, my modified version appears unable to find <code>metafor</code>'s other internal functions:</p>
  
  <pre><code>Error in .chkdots(ddd, c("knha", "scale", "link", "outlist")) : 
    could not find function ".chkdots"
  </code></pre>
  
  <p>I also tried simply calling <code>my.rma.uni</code> directly (which would actually be my preference so that I can have both the standard <code>rma.uni</code> and my version available at the same time), but this yields the same error. </p>
  
  <p><strong>How can I ensure that my modified function can access all the internal functions?</strong></p>