[Rd] Listing Packages in Depends or Imports
Barry Rowlingson
b.rowlingson at lancaster.ac.uk
Fri Jun 27 09:40:04 CEST 2014
On Fri, Jun 27, 2014 at 3:00 AM, Dario Strbenac
<dstr7320 at uni.sydney.edu.au> wrote:
> Hello,
>
> The Writing R Extensions manual gives confusing advice. Compare
>
> Packages listed in imports or importFrom directives in the NAMESPACE file should almost always be in ‘Imports’ and not ‘Depends’.
>
> with
>
> Almost always packages mentioned in ‘Depends’ should also be imported from in the NAMESPACE file
Why is that confusing? Its perfectly logical.
First line says that packages imported in the NAMESPACE should
usually be in "Imports" in the DESCRIPTION. It implies there are
special cases when "Depends" may be correctly used.
Second line is that packages that are listed as Depends in
DESCRIPTION should usually be imported in the NAMESPACE file, but
implies there may be exceptions - you might correctly have a "Depends"
that doesn't have an import in the NAMESPACE.
In themselves, those two statements are perfectly logical and consistent.
As an attempt to explain **when** you'd put a reference in Depends or
Imports or why you'd use one of those get-out exceptions, it makes no
claims!
Barry
More information about the R-devel
mailing list