Message-ID: <22435.25735.881096.176575@max.nulle.part>
Date: 2016-08-04T15:51:35Z
From: Dirk Eddelbuettel
Subject: [R-pkg-devel] Handling Not-Always-Needed Dependencies? - Part 2
In-Reply-To: <7b4d6a50-7df0-8d1a-75f2-c2be8222de68@gmail.com>
On 4 August 2016 at 11:46, Paul Gilbert wrote:
| If my package has a test that needs another package, but that package is
| not needed in the /R code of my package, then I indicate it as
| "Suggests", not as "Depends" nor as "Imports". If that package is not
| available when I run R CMD check, should the test pass?
Wrong question.
Better question: Should the test be running? My preference is for only
inside of a requireNamespace() (or equivalent) block as the package is not
guaranteed to be present. In theory.
In practice people seem to unconditionally install it anyway, and think that
is a good idea. I disagree on both counts but remain in the vocal minority.
Dirk
--
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org