title: Add objects to package namespace
body: <p>I'd like to push a function inside a package namespace so it can access internal objects of that package (let's use stats package as an example). I've tried using</p>
  
  <pre><code>myfun &lt;- function(x) print(x)
  env = loadNamespace("stats")
  assign("myfun", myfun , env)
  </code></pre>
  
  <p>But it is locked. So I've tried to unlock my object</p>
  
  <pre><code>unlockBinding("myfun", env)
  </code></pre>
  
  <p>Since myfun doesn't exist yet, I can't unlock it.</p>
  
  <p>Any help ?</p>