parser
parser copied to clipboard
.Call improperly formed
from Prof. Brian Ripley:
For a package with a namespace (all these days), .C etc are allowed without a PACKAGE argument to refer to entry points in the package, but that was never checked.
I wrote some diagnostic code, and the namespace identification is not doing a particularly good job. For example calls like
drop(.C(...))
do.call(".C", args)
are all missed, including some in your package (and ca 25 others). We will do better in R-devel, but if you want the package to work well in earlier versions you should add PACKAGE arguments.
An even better idea is to register your entry points and refer to them as R objects. This is done extensively in R itself, so for example fisher.test contains
else PVAL <- .C(C_fexact, nr, nc, x, nr, as.double(-1),
as.double(100), as.double(0), double(1), p = double(1),
as.integer(workspace), mult = as.integer(mult), PACKAGE = "stats")$p
(and the PACKAGE = "stats" is not actually needed).