Skip to content
Prev 260417 / 398502 Next

identical function names from 2 packages

My understanding (which is pretty shaky when it comes to namespaces) is
that if you have things set up correctly then namespaces will make sure
that function calls within functions in the given package will be to be to
functions in that package and not to their doppelgangers in other packages
which may be attached.

E.g. if you have another function in the "teaser" package that calls lm(),
(and if you have the teaser namespace set up properly) it will call the
lm() in the teaser package and *not* the lm() in the "stats" package.

But a call to lm() from a function not in "teaser", or from the command
line will get the lm() in whichever package ("teaser" or "stats") is closer
to the start of the search path.  And there's really nothing much that
can be done about this.  Have I got that right?

     cheers,

             Rolf Turner
On 20/05/11 18:26, Jari Oksanen wrote: