From csardi.gabor at gmail.com  Sat May  2 01:24:04 2015
From: csardi.gabor at gmail.com (=?UTF-8?B?R8OhYm9yIENzw6FyZGk=?=)
Date: Fri, 1 May 2015 19:24:04 -0400
Subject: [Rd] R CMD check and missing imports from base packages
In-Reply-To: <21825.56681.241681.166313@stat.math.ethz.ch>
References: <CABtg=K=iq7XVY8NksW-gQq_zr7wk4329Sh67c55JxrFF2HDosQ@mail.gmail.com>
	<55413E1A.9030804@fredhutch.org>
	<CAF8bMcb_3SuzLLwNg-znVByO2XtXsxwGnObMZ_4jmvv9oSHXLQ@mail.gmail.com>
	<5541737A.10205@gmail.com>
	<CABtg=KnThd61TgaFmRutS=eOPUFXsPnLzHJK=Vg_T60gcP-yWA@mail.gmail.com>
	<21825.56681.241681.166313@stat.math.ethz.ch>
Message-ID: <CABtg=KnOsnaER=X7V9uYehrGySPiY3LVVtB14m-5jjOnea5RXA@mail.gmail.com>

On Thu, Apr 30, 2015 at 3:44 AM, Martin Maechler <
maechler at lynne.stat.math.ethz.ch> wrote:
[...]

>
> If I have understood your main point correctly, you are
> suggesting that  'R CMD check' should start putting out a NOTE
> when package code calls a function from one of a set of
> "standard packages" (*) and the package author failed to use an
>         importFrom(<standard pkg>, <function>)
> in his/her NAMESPACE.
>

Yes, correct.

I agree that this would be useful.
> Actually, I think we have something like this in place already...
> but maybe not strictly enough (?)
>

It is in place for non-standard packages. But not for the standard ones.
This code
calls a function from all base packages that are loaded by default:
https://github.com/gaborcsardi/baseimports/blob/master/R/baseimports.R#L11
and it generates these checks on R-release and R-devel, both without NOTEs
or WARNINGs:
https://travis-ci.org/gaborcsardi/baseimports/jobs/60903983
https://travis-ci.org/gaborcsardi/baseimports/jobs/60903984

Gabor


>
> (*) IIUC, you suggested to use
>    "standard packages" := packages which are attached by default
>    in R, apart from package 'base' because that does come
>    immediately after the imports anyway (and because you cannot
>    explicity import from base).
>
>
> Martin Maechler
> ETH Zurich
>

	[[alternative HTML version deleted]]



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