I'd add: as far as I know CRAN policy would only require you to report the minimum version if your package would fail on one of the older R versions that CRAN still tests (at present I think this goes back to 3.5.2). For regular package developers (i.e. without the resources of RStudio) it's a nuisance to install lots of old versions of R just to find out how far back your package actually works. IMO it's a little bit obnoxious (albeit maybe unintentionally so) to prevent users who are stuck with earlier versions from using your package without a good reason. (For this reason I try to save RData files that are included in my packages with version=2 so that users with R <3.5.0 aren't left out ...)
Unless you know that your package depends on features introduced in a particular version of R, I'd leave it out. If you find out later from users that it breaks on earlier versions, and you can't find a way to enable its use on earlier versions, you can add the dependency in a later release. Ben Bolker On 2019-07-26 10:20 a.m., Hadley Wickham wrote: > I no longer believe this to be good advice - I think you should only > declare a specific dependency if you want to strongly assert that your > package works with those versions. For example, all tidyverse versions > depend on R 3.2 and later, because we test on all those versions. > > Hadley > > On Friday, July 26, 2019, Jarrett Phillips <phillipsjarre...@gmail.com> > wrote: > >> Hello, >> >> Numerous CRAN packages report minimum R versions within the Depends field >> of the DESCRIPTION file. >> >> Is this reporting always necessary? >> >> Hadley Wickham's book "R Packages" states: >> >> "You can also use Depends to require a specific version of R, e.g. >> Depends: R >> (>= 3.0.1) . As with packages, it’s a good idea to play it safe and require >> a version greater than or equal to the version you’re currently using. >> devtools::create() will do this for you." >> >> devtools::check() doesn't warn about not specifying R version, so I am just >> curious. >> >> >> Thanks. >> >> Cheers, >> >> Jarrett >> >> [[alternative HTML version deleted]] >> >> ______________________________________________ >> 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