From csardi.gabor at gmail.com  Wed Apr 29 22:39:47 2015
From: csardi.gabor at gmail.com (=?UTF-8?B?R8OhYm9yIENzw6FyZGk=?=)
Date: Wed, 29 Apr 2015 16:39:47 -0400
Subject: [Rd] R CMD check and missing imports from base packages
In-Reply-To: <55413E1A.9030804@fredhutch.org>
References: <CABtg=K=iq7XVY8NksW-gQq_zr7wk4329Sh67c55JxrFF2HDosQ@mail.gmail.com>
	<55413E1A.9030804@fredhutch.org>
Message-ID: <CABtg=K=gY_zkpy_LSYGT-UtGDcbm60o4O5FD4v1TBx59W6VmKA@mail.gmail.com>

On Wed, Apr 29, 2015 at 4:24 PM, Martin Morgan <mtmorgan at 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]]



[Rd] R CMD check and missing imports from base packages
=?UTF-8?B?R8OhYm9yIENzw6FyZGk=?=