Skip to content
Prev 19420 / 63424 Next

How to change names when importing with a NAMESPACE (was: NAMESPACE Q: does import as exist?)

This is indeed described in

http://www.stat.uiowa.edu/~luke/R/namespaces/morenames.html

linked from developer.r-project.org.

with the comment

   The purpose of baz is to import some of the exports of foo and bar and
   re-export them, using renaming in one case: bar's export g is imported
   under the internal name hh, and the internal variable hh is exported
   under the name gg. [Renaming seems like a useful option, but it may
   turn out to create too many complications and need to be dropped.]

It's been there since 1.7.0 and not yet been dropped.  (I would also 
suggest checking the R-News article on namespaces, which I have not done.
But checking the developer site is always worthwhile.)

It would be nice to have more end-user documentation on namespaces, and I 
have suggested it in the past.  A project for you, perhaps?
On Wed, 8 Feb 2006, Seth Falcon wrote: