Re: [R-pkg-devel] Should 'methods' be in Imports?

2023-03-16 Thread Noah Greifer
Thank you both for your responses. Based on Ivan's dig into the comments, it seems there is ambiguity, even by the CRAN team. Still, it looks like it would be preferable to (and would not cause any harm to) include the base packages in DESCRIPTION if they are used at all in a package, whether by

Re: [R-pkg-devel] Should 'methods' be in Imports?

2023-03-16 Thread Ivan Krylov
On Thu, 16 Mar 2023 11:29:33 -0400 Noah Greifer wrote: > Is including these packages filling the DESCRIPTION with unnecessary > dependencies that are automatically satisfied, or is it being > helpfully explicit about the packages your package relies on? Here's a comment from the part of R CMD

Re: [R-pkg-devel] Should 'methods' be in Imports?

2023-03-16 Thread Duncan Murdoch
On 16/03/2023 2:21 p.m., Noah Greifer wrote: Thank you for your input. /broom/, /mlogit/, /twang/, and /Hmisc/ are examples of major packages that import functions from /stats/, /utils/, /graphics/, or other base packages but don't include them in the DESCRIPTION. All of my packages

Re: [R-pkg-devel] Should 'methods' be in Imports?

2023-03-16 Thread Noah Greifer
Thank you for your input. *broom*, *mlogit*, *twang*, and *Hmisc* are examples of major packages that import functions from *stats*, *utils*, *graphics*, or other base packages but don't include them in the DESCRIPTION. All of my packages (*cobalt*, *WeightIt*, *MatchIt*) do too, and I have never

Re: [R-pkg-devel] Should 'methods' be in Imports?

2023-03-16 Thread Duncan Murdoch
I think the Writing R Extensions manual is pretty clear about this: yes, you should include "methods" in Imports or Depends if you are calling methods::. You say "some packages do so and some don't". Which ones don't? It's helpful to be specific in your examples. Duncan Murdoch On

[R-pkg-devel] Should 'methods' be in Imports?

2023-03-16 Thread Noah Greifer
Hello developers, I am wondering if base packages whose functions are used in my package need to be present in Imports in my DESCRIPTION. For example, if I use the function abline(), which exists in the *graphics* package, do I need to include *graphics* in Imports? Note I am not asking about