[R-pkg-devel] trivial package with R CMD check ERRORs that seem unrelated to package contents
Duncan Murdoch
murdoch.duncan at gmail.com
Thu May 28 16:10:04 CEST 2015
On 28/05/2015 9:19 AM, Richard M. Heiberger wrote:
> I posted a package
> trivial_3.1-18.tar.gz
> and the
> 00check-trivial.log
> from R-devel at
>
> http://astro.temple.edu/~rmh/HH-test/
>
> The package contains one function
> trivial <- function(...) {}
> and a NAMESPACE that imports other packages.
>
> The 00check-trivial.log has many messages that look like they depend
> on aspects of the imported packages, including five of these
> Error in validObject(.Object) :
>
> I need guidance on how to respond to these.
>
> My real package
> HH_3.1-17.tar.gz
> is also there along with a clean check log from R-3.1.2 and a check log
> I don't understand from R-devel.
You're importing a lot of packages. I think the first set of warnings
* checking whether package 'trivial' can be installed ... WARNING
Found the following significant warnings:
Warning: replacing previous import by 'shiny::radioButtons' when loading 'trivial'
Warning: replacing previous import by 'stats::dbinom' when loading 'trivial'
Warning: replacing previous import by 'stats::pnorm' when loading 'trivial'
Warning: replacing previous import by 'stats::dnorm' when loading 'trivial'
Warning: replacing previous import by 'stats::dpois' when loading 'trivial'
Warning: replacing previous import by 'latticeExtra::rootogram' when loading 'trivial'
could mean what they say: you already have a function called
radioButtons imported, and shiny::radioButtons is masking it, and
similarly for the other warnings. Or it could be a bug in R-devel. If it
really is a case of masking, the solution is probably to import less:
just name the functions you really need, don't import everything.
The error
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called 'e1071'
Error: package or namespace load failed for 'trivial'
Execution halted
appears to be clear. You don't import e1071, but presumably one of your
imports does, and you don't have it.
I would guess the reason you didn't get the warnings previously is
because it's a new check, and you didn't get the error because you did
have e1071, or you were using different versions of the imported
packages, and they didn't need it.
The errors like
Error in validObject(.Object) :
invalid class "ObjectsWithPackage" object: superclass "atomicVector" not defined in the environment of the object's class
Execution halted
could be a bug in R-devel, or perhaps they are caused by using old
versions of packages rather than reinstalling them for R-devel. I'm not
sure what your response should be to these. You could try
install.packages() on all the dependencies just to be sure you have the
latest builds; If they're an R-devel bug, they'll probably go away soon.
Duncan Murdoch
More information about the R-package-devel
mailing list