Errors when base package version is specified

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Errors when base package version is specified

Duncan Murdoch-2
On StackOverflow (, a user
was confused by the error messages from R when the DESCRIPTION file for
his package specified

   Imports:  stats >= 4.0.2

The message from an attempted source build in R 3.6.1 said:

   Warning in install.packages :
     dependency ‘stats’ is not available
   installing the source package ‘doebioresearch’

and later

   Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()),
versionCheck = vI[[j]]) :
     namespace 'stats' 3.6.1 is already loaded, but >= 4.0.2 is required
   Calls: <Anonymous> ... namespaceImportFrom -> asNamespace ->
   Execution halted

Would it be worth giving an error or warning right away based on the
Imports line?  It doesn't make sense to specify the version of a base
package.  If he had specified R >= 4.0.2 I think the messages for R
3.6.1 users would have been less confusing.

Duncan Murdoch

[hidden email] mailing list