On 17/11/2017 2:30 AM, Jeff Newmiller wrote:
Obvious? How about "obscurity"? Just directly use pkg::fun if you have name collision.
One disadvantage of this is that the availability of pkg may not be checked until you use it. Package checks will complain if you haven't declared in the DESCRIPTION file that you are importing from pkg, but the package will run even if you ignore that check.
But one thing I just realized is that Boris was probably not talking about writing a package, he was likely thinking about writing scripts. Then DESCRIPTION and NAMESPACE files don't exist, and his student's suggestion seems like a reasonable idea, more in the spirit of named imports than using "library(pkg)" or "require(pkg)".
Duncan Murdoch ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.