[R-pkg-devel] Large data package

Dirk Eddelbuettel edd @end|ng |rom deb|@n@org
Sun May 2 17:27:34 CEST 2021


On 2 May 2021 at 15:00, Ayala Hernandez, Rafael wrote:
| Thanks a lot for your clarifications. Both of your explanations make sense. Indeed, I would rather not have any other packages depend on the data package, at least not for the time being, in case I find good reasons to make modifications in the data package.
| 
| But it makes sense to try to pass the auto checks as much as possible. I will work towards trying to avoid :::

I fear you are still looking at the wrong windmill, longing for a fight.

There is _nothing_ wrong with a :: for package you have a Suggests: on, and
having a _conditional dependence_ on a large data package is where we
started. You could just use :: in your package, as long as it is inside
blocks of the form
  if (requireNamespace(nameOfDataPackage, quietly=TRUE)) { ... }
or if you really dislike ::,  use a library(nameOfDataPackage).

The key is to use the conditional dependence via such a test in the code.

And the CRAN Repo Policy and Writing R Extensions are moving ever so slowly
in this direction. It is not something that can be enforced yet given both
the number of packages still doing it wrong, and the number of people who
continue repeating that this is a good or acceptable practice. We can and
will do better, just how we moved to using NAMESPACES for a reason.

Dirk

-- 
https://dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org



More information about the R-package-devel mailing list