[R-pkg-devel] Package required and available but unsuitable version: 'stats'
Martin Maechler
maechler at stat.math.ethz.ch
Thu Jul 20 18:01:44 CEST 2017
>>>>> Maxime Turgeon <maxime.turgeon at mail.mcgill.ca>
>>>>> on Thu, 20 Jul 2017 15:51:18 +0000 writes:
> Hi Jernej,
> The check errors you get are for older releases of R (3.3.2 and 3.3.3). The issue arises from your requirement in DESCRIPTION that the version of stats should be 3.4.0. Therefore, the solution to your problem depends on whether you really need this requirement on the version of stats or not: if you don't, simply lower the requirements to whatever you need; if you do, then this check error is valid, in the sense that you don't want users to use your package if they don't have the appropriate version of the stats package.
> Note that if the latter applies, you should probably change your requirement on the version of R itself: currently you're requiring 3.1, which clashes with you're requiring 3.4 for stats.
I would go slightly further say that it is "conceptually wrong"
to use any version requirement on 'stats': The version of
'stats' is *always* equal to the version of R.
So really, do replace
"stats (>= 3.4.0)"
by "stats"
Also, are you sure that R 3.1.0 is sufficient for dendroExtra, i.e.,
can you check that, or did you at least check that for a
slightly older version of dendroExtra in the past?
The CRAN "robots" will not be able to check that, but as you see
checks for the "last before release" version, in this case R 3.3.x,
are made.
To be save, you'd say "R (>= 3.3.3)"
whereas to be relaxed, you'd leave away any version requirement
for R unless you know that you are using a relatively new
feature of R (which includes 'stats', 'utils', etc).
Best,
Martin
> Best,
> Max
>> Hi,
>> recently, my first R package dendroExtra
>> <https://cran.r-project.org/package=dendroExtra> was accepted on CRAN. I
>> still must fix one problem that is given by CRAN checks
>> <https://cran.r-project.org/web/checks/check_results_dendroExtra.html>.
>> It says: Package required and available but unsuitable version: 'stats'.
>> I see that probable I did not correctly import the stats package. If I
>> remove the 'stats' package, I get an error in R CMD check. Is there any
>> suggestion how to properly solve the issue? How to properly import stats
>> package?
>> Thank you for your help.
>> Bests, Jernej
More information about the R-package-devel
mailing list