[R-pkg-devel] Is it ever appropriate (or mandatory) to Suggests: R (>= version) ?

Uwe Ligges ligges at statistik.tu-dortmund.de
Wed Jan 24 15:19:59 CET 2018


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
>



More information about the R-package-devel mailing list