[R-pkg-devel] Large data package
Ayala Hernandez, Rafael
r@@y@|@14 @end|ng |rom |mper|@|@@c@uk
Sun May 2 18:01:52 CEST 2021
Dear Dirk,
Thanks a lot for your detailed explanation. This is indeed the solution that I have found to work nicely, and indeed keeps the code equally tidy.
In fact, I am finding that using :: to access exported objects instead of ::: to access any object in the data package even helps me organize the code better, since I have a clear record of the interaction between the 2 packages (in the form of exports in the NAMESPACE of the Data package).
Together with conditional checks to ensure that the data package is available before running code that requires it, it seems to be the best solution to me.
Best wishes,
Rafa
> El 2 may 2021, a las 17:27, Dirk Eddelbuettel <edd using debian.org> escribió:
>
>
> 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
>
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
More information about the R-package-devel
mailing list