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-boun...@r-project.org] on behalf of Hugh Parsonage [hugh.parson...@gmail.com] Sent: 24 January 2018 13:44 To: r-package-devel@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@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel ______________________________________________ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel