[Rd] 'CanMakeUseOf' field

Duncan Murdoch murdoch at stats.uwo.ca
Tue Aug 29 19:00:05 CEST 2006


On 8/29/2006 11:58 AM, Seth Falcon wrote:
> Duncan Murdoch <murdoch at stats.uwo.ca> writes:
>> I think we need an option to R CMD check rather than a new field in the 
>> DESCRIPTION.  Currently a package could be mentioned for any of these 
>> reasons:
>>
>> 1.  To make functions, examples or vignettes work
>> 2.  To allow optional functionality in functions, examples or vignettes.
>> 3.  Because it contains complementary functions.
>>
>> I don't think we really need to worry about 3:  it should be contained 
>> in 1 or 2, if reasonably complete examples are given.
>>
>> Case 1 is handled by Depends.
> 
> I think there is an important distinction between a dependency needed
> for the package to function and a dependency needed to demonstrate
> said functionality via an example or vignette.  The former is what
> Depends is about, the latter is something else (Suggests).

Yes, that's a good point, especially with vignettes.  Only the package 
author needs to be able to run them.

But maybe examples should be considered broken if they don't work. Users 
should be able to expect example(foo) not to generate an error.  Package 
authors should wrap optional examples in code like if (require(...)).

Duncan Murdoch


> 
>> An author should check case 2 both with and without the suggested 
>> package.  A user  might be satisfied with a simple check "as things 
>> currently stand", or might want a stringent check like the author wants. 
>>   The author can't know that, because it will depend on the user.
>>
>> So I don't think this is something that should be changed in 
>> DESCRIPTION.  There should be an option to R CMD check to include or 
>> exclude packages mentioned in the Suggests entry.  (I'd suggest a 3 
>> level option:  check as though they are not available, check as 
>> currently installed, require that they be available.)
> 
> I like this approach and agree in general that a solution involving
> changes to R CMD check might be the best as opposed to adding fields.
> 
> + seth
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel




More information about the R-devel mailing list