The subject line says it all. How can I find what Error: cannot set length of non-vector means? RTFS is no help. I can find out of course that it comes from "lengthgets", but who called that? Not me! The situation is as follows. I am trying to get a package ready for CRAN. Every time I run "R CMD check" I get this error when building the package vignette. But (!) "R CMD build" has no complaints and neither does "Sweave" when run directly on the vignette. The whole story is in the file stat.umn.edu/geyer/mcmc/package/typescript If it makes any difference R 2.1.0 alpha (2005-03-31) gcc (GCC) 3.3.3 (SuSE Linux) SuSE Linux 9.1 (i586) Linux 2.6.5-7.104-smp i686 athlon i386 GNU/Linux The whole package is stat.umn.edu/geyer/mcmc/package/mcmc_0.5.tar.gz As far as I can see there is no "debug" mode for "R CMD check" that will tell me what it is complaining about. Google gives me only a couple of other packages exhibiting this error and no helpful info.
On Sat, 2 Apr 2005 23:50:24 -0600, Charles Geyer <charlie@stat.umn.edu> wrote :>The subject line says it all. How can I find what > > Error: cannot set length of non-vector > >means? RTFS is no help. I can find out of course that >it comes from "lengthgets", but who called that? Not me!I think the error comes from your second chunk where you have read.table("logit.txt", header=T). I don't think CHECK is running in the right directory to find the file. Whether this is your bug or CHECK's bug, I don't know. It certainly would be nice if CHECK errors were easier to diagnose. I'm not sure my diagnosis is right, because I was just trying to manually duplicate bits of the CHECK script, and I might have missed a setwd somewhere. Duncan Murdoch
On Mon, Apr 04, 2005 at 07:58:59AM -0700, Robert Gentleman wrote:> Well, then what most of us, that really want to figure it out do is: > 1) look at the check script and find the actual invocation of Sweave > (try running checkVignettes from the prompt, try running R with > --quiet, etc. > > It looks very much like a memory protection bug, either in R or in > your code (do you have C/Fortran) and if so, you might try running with > -d valgrind (now you do not want to do that on a tiny little computer > as valgrind sucks up a lot of time).No, I've already done that too. R CMD check --use-valgrind mcmc gives no errors from valgrind. BTW, this is really ultra hyper cool!!!!!!! Thanks to whoever is responsible. -- Charles Geyer Professor, School of Statistics University of Minnesota charlie@stat.umn.edu