On Wed, Apr 29, 2015 at 4:24 PM, Martin Morgan <mtmor...@fredhutch.org> wrote:
> On 04/28/2015 01:04 PM, Gábor Csárdi wrote: > [...] > E.g. if package 'ggplot2' uses 'stats::density()', and package 'igraph' >> also defines 'density()', and 'igraph' is on the search path, then >> 'ggplot2' will call 'igraph::density()' instead of 'stats::density()'. >> > > stats::density() is an S3 generic, so igraph would define an S3 method, > right? And in general a developer would avoid masking a function in a base > package, so as not to require the user to distinguish between > stats::density() and igraph::density(). Maybe the example is not meant > literally. > Yes, maybe this is not the best example. I would not go into the details here, because they are not really important for the current discussion. > Being able to easily flag non-imported, non-base symbols would definitely > improve the robustness of package code, even if not helping the end user > disambiguate duplicate symbols. > In 'non-base' I assume you mean the single base package. Just to address the second part, I think the end-user does not have to deal with this. (Unless it is buggy like it is now.) The fact that ggplot2 calls density() is not the user's concern. Gabor [...] [[alternative HTML version deleted]] ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel