From cubranic at stat.ubc.ca  Tue Nov  6 20:44:08 2012
From: cubranic at stat.ubc.ca (Davor Cubranic)
Date: Tue, 6 Nov 2012 11:44:08 -0800
Subject: [Rd] Depends/Imports/Suggest/Enhence
In-Reply-To: <50994D8C.6020903@statistik.tu-dortmund.de>
References: <5099387D.1060805@u-paris10.fr>
	<74B4544F-4D67-49AC-A293-3AAE59CFFF25@r-project.org>
	<5099411D.6020608@u-paris10.fr>
	<50994D8C.6020903@statistik.tu-dortmund.de>
Message-ID: <23B7066B-96E1-4C93-91B8-FCD2BF0E769B@stat.ubc.ca>

On 2012-11-06, at 9:49 AM, Uwe Ligges wrote:

> On 06.11.2012 17:55, Christophe Genolini wrote:
>> 
>>> "Imports" means that symbols are imported form the namespace, so they
>>> are mandatory for the package to operate. "Suggests" means that
>>> symbols from the package are not required, but they are used in
>>> examples or vignettes, so the listed package(s) will be needed for a
>>> full check. They are not needed for the operation of the package, though.
>> That's very clear, thanks a lot.
>> So I will use
>> 
>> 
>>  - 'Depends:foo1' if there is a function in foo1 that my package use often
> 
> No, better make use of Namespace imports all the time and only use "Depends" if you really need the other package to be installed. This is rarely needed.

Uwe, did you mean to say "only use 'Depends' if the other package really needs to be *attached*"? Because in terms of determining dependencies for `install.package`, I thought "Imports" and "Depends" are no different. (Unless the user explicitly chooses otherwise in the 'dependencies' argument, that is.)

>> - 'Imports:foo2' if there is a function in foo2 that my package might
>> use rarely


I don't think choosing to declare "Imports" has anything to do with frequency of use. But if you do use it, then don't forget to include "imports(foo2)" or "importsFrom(foo2, ...)" in the NAMESPACE file.

Davor



[Rd] Depends/Imports/Suggest/Enhence
Davor Cubranic