I believe it is a requirement that if package A imports package B, and
package B lists package C in Depends: then package A must also list
package C in Depends:
A popular stackoverflow answer states this.[1] I can't find any other
source but it makes sense.
What if package B is suggested by package A and package B depends on a
certain version of R? That is if package A *suggests* package B and
package B lists Depends: R (>= ver). In such a case, is it necessary
to list this dependency in Suggests? Certainly endnote 12 of WRE says
it would be necessary if the dependency were for a package, but
doesn't seem to mention similar dependencies on R version. And, as far
as I can see, no package on CRAN lists R in Suggests, so it would to
be non-standard if not prohibited.
S <- available.packages()
S[grepl("(?<!([A-Za-z]))R \\(", S[, "Suggests"], perl = TRUE), ]
[1] https://stackoverflow.com/a/8638902/1664978
[R-pkg-devel] Is it ever appropriate (or mandatory) to Suggests: R (>= version) ?
3 messages · Hugh Parsonage, Uwe Ligges, Georgi Boshnakov
This is implicitly OK: If A suggests B and B depends on some R version, then B is only available if you are running that R version anyway, hence the additional declaration is not needed. The typical cause of trouble is as follows: A depends on B and B suggests C. Then A has to suggest C in case spme functionality in A relies on parts of B that actually need C. Best, Uwe Ligges
On 24.01.2018 14:44, Hugh Parsonage wrote:
I believe it is a requirement that if package A imports package B, and
package B lists package C in Depends: then package A must also list
package C in Depends:
A popular stackoverflow answer states this.[1] I can't find any other
source but it makes sense.
What if package B is suggested by package A and package B depends on a
certain version of R? That is if package A *suggests* package B and
package B lists Depends: R (>= ver). In such a case, is it necessary
to list this dependency in Suggests? Certainly endnote 12 of WRE says
it would be necessary if the dependency were for a package, but
doesn't seem to mention similar dependencies on R version. And, as far
as I can see, no package on CRAN lists R in Suggests, so it would to
be non-standard if not prohibited.
S <- available.packages()
S[grepl("(?<!([A-Za-z]))R \\(", S[, "Suggests"], perl = TRUE), ]
[1] https://stackoverflow.com/a/8638902/1664978
______________________________________________ R-package-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
The advice at the link you cite ([1] https://stackoverflow.com/a/8638902/1664978) is not quite right:
I believe it is a requirement that if package A imports package B, and package B lists package C in Depends: then package A must also list package C in Depends: A popular stackoverflow answer states this.[1] I can't find any other source but it makes sense.
You don't need (and in general should not) put a package in Depends only because some of your imports do. In some cases you may have to, but this is only because of missing imports in the package you import. Note that even if the package you import (package B) "Depends" on package "C", "B" still needs to import the functionality from "C" it needs (e.g. putting import(C)) in its NAMESPACE file. These days 'R CMD check' enforces this but some older packages on CRAN may not have the import() directives and in that case you have no other option than to "Depend" on "C". (In this case, write to the package maintainer to alert them about the problem.) As to indirect dependency on R version I am also not clear. Georgi
From: R-package-devel [r-package-devel-bounces at r-project.org] on behalf of Hugh Parsonage [hugh.parsonage at gmail.com]
Sent: 24 January 2018 13:44
To: r-package-devel at r-project.org
Subject: [R-pkg-devel] Is it ever appropriate (or mandatory) to Suggests: R (>= version) ?
Sent: 24 January 2018 13:44
To: r-package-devel at r-project.org
Subject: [R-pkg-devel] Is it ever appropriate (or mandatory) to Suggests: R (>= version) ?
I believe it is a requirement that if package A imports package B, and
package B lists package C in Depends: then package A must also list
package C in Depends:
A popular stackoverflow answer states this.[1] I can't find any other
source but it makes sense.
What if package B is suggested by package A and package B depends on a
certain version of R? That is if package A *suggests* package B and
package B lists Depends: R (>= ver). In such a case, is it necessary
to list this dependency in Suggests? Certainly endnote 12 of WRE says
it would be necessary if the dependency were for a package, but
doesn't seem to mention similar dependencies on R version. And, as far
as I can see, no package on CRAN lists R in Suggests, so it would to
be non-standard if not prohibited.
S <- available.packages()
S[grepl("(?<!([A-Za-z]))R \\(", S[, "Suggests"], perl = TRUE), ]
[1] https://stackoverflow.com/a/8638902/1664978
______________________________________________
R-package-devel at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel