CRAN check warning: Dependence on R version '3.4.3' not with patchlevel 0
Asked Answered
P

2

31

I am submitting my R package to CRAN, and am receiving a warning from the CRAN servers that does not appear when I run R CMD CHECK --as-cran locally on the package tarball prior to uploading to CRAN. This causes my package to fail the automatic CRAN check.

This is the warning:

* checking DESCRIPTION meta-information ... WARNING
Dependence on R version '3.4.3' not with patchlevel 0

My DESCRIPTION file contains this line:

Depends: R (>= 3.4.3)

What does this warning mean? Thanks!

Pros answered 24/1, 2018 at 23:33 Comment(0)
S
39

From the latest version of Writing R Extensions we note, from Section 1.1.3:

It is inadvisable to use a dependence on R with patchlevel (the third digit) other than zero. Doing so with packages which others depend on will cause the other packages to become unusable under earlier versions in the series, and e.g. versions 3.x.1 are widely used throughout the Northern Hemisphere academic year.

The patchlevel is z in R x.y.z, so you are specifying a patchlevel of 3 for the 3.4 point release, and that is what is being warned against.

Do you need to depend on this particular patchlevel?

Slay answered 24/1, 2018 at 23:40 Comment(2)
Is there a way to make devtools::create_description default to patchlevel 0? Ideally without using options(devtools.desc = list(Depends = "3.5.0")), which would make my code obsolete as soon as 3.6.0 is released. Thanks... sorry, should have googled a bit more. sessionInfo()$R.version$minor returns the value I need.Prostitute
“Do you need to depend on this particular patchlevel?” — Yes, absolutely. This is perfectly sensible if a package depends on a feature that was broken in previous versions of that particular minor version. In fact, depending on the latest patch level of a minor version is often more meaningful than depending on the next minor version (particularly in the case of R 3.6). Shame that CRAN doesn’t agree.Cutlery
O
24

That was discussed recently on the (excellent) r-package-devel list: Such dependencies should be made to the 'zero' level, ie R (>= 3.4.0).

Ocher answered 24/1, 2018 at 23:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.