From b.rowlingson at lancaster.ac.uk  Fri Jun 27 09:40:04 2014
From: b.rowlingson at lancaster.ac.uk (Barry Rowlingson)
Date: Fri, 27 Jun 2014 08:40:04 +0100
Subject: [Rd] Listing Packages in Depends or Imports
In-Reply-To: <d5f96359bb8f49a8ab8d42077ae5210d@EX-0-HT0.lancs.local>
References: <d5f96359bb8f49a8ab8d42077ae5210d@EX-0-HT0.lancs.local>
Message-ID: <CANVKczNpcsTusQ4sEvUd+M=d4PJpeATNui=7Cfbf4tmUGRScuw@mail.gmail.com>

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



[Rd] Listing Packages in Depends or Imports
Barry Rowlingson