Skip to content
Prev 4748 / 12125 Next

[R-pkg-devel] inconsistent behavior between R CMD check and interactive use

Duncan,

Thank you offering to look.
I have tried all the obvious things that I could think of.  None helped.
Perhaps you will think of something I haven't tried

The reproducible example (not minimal) I can suggest is to use the
submitted file.

ftp://CRAN.R-project.org/incoming/archive/HH_3.1-38.tar.gz

On my windows machine

R CMD check --as-cran HH_3.1-38.tar.gz
halts with
Error in apply(x, 3:ldx, function(x) list(x)) :
  'MARGIN' does not match dim(X)
Calls: likert ... as.MatrixList -> as.MatrixList.array -> lapply -> apply
Execution halted

This is wrong.  That problem was in 3.1-37 and is why I needed a new version.
I repaired that problem. Running interactively, that command succeeds
on my machine.

R CMD check --as-cran --run-dontrun     HH_3.1-38.tar.gz
halts with
Error in confintervaldata() : could not find function "confintervaldata"
Execution halted

That is wrong.  confintervaldata is in the NAMESPACE.
Running interactively, that command succeeds.
I added an ls("package:HH") ## yes I spelled it correctly
and the confinervaldata is missing from the list.  Again, it is in the
NAMESPACE for the generated executable package.


On the CRAN machines, neither of these problems appeared.  Instead
they found a different error
from code analysis, not from an execution failure.  I don't understand
why I didn't get that issue on
my machine when I used --as-cran.  The repair is in 3.1-39, which I
haven't sent in yet.
The repair is to replace
class(xxx) == "try-error"
with
"try-error" %in% class(xxx)

Please let me know if you see these same problems, or if you can think
of something else to try.

Rich
On Sun, Dec 8, 2019 at 4:58 PM Duncan Murdoch <murdoch.duncan at gmail.com> wrote: