[Rd] Error: cannot set length of non-vector

Charles Geyer charlie at stat.umn.edu
Sun Apr 3 19:24:21 CEST 2005


On Sun, Apr 03, 2005 at 09:13:56AM -0400, Duncan Murdoch wrote:
> On Sat, 2 Apr 2005 23:50:24 -0600, Charles Geyer
> <charlie at 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.

No.  That's not it.  (I'm almost sure.)

I've rewritten the read.table to read from the web.  Now there are no local
reads.  Of course there are local writes to the eps and pdf files for
figures that it builds.

But even more important, despite the "error" the vignette is created just
fine (see the bottom of the new, just redone)

    http://www.stat.umn.edu/geyer/mcmc/package/typescript

No difference in the two tex files (produced by R CMD build and R CMD check)
except for timing stuff.  Furthermore

    http://www.stat.umn.edu/geyer/mcmc/package/mcmc.Rcheck/mcmc/doc/demo.pdf

looks o. k. to me.  (All the figures are there, for example).
I can't do a diff on pdf's but it seems like the error is not in
the vignette or in Sweave but in the plumbing (or in some weird interaction
of all of the above -- or in something I can't imagine).

For anyone else interested, the package (just rebuilt) is

    http://www.stat.umn.edu/geyer/mcmc/package/mcmc_0.5.tar.gz

-- 
Charles Geyer
Professor, School of Statistics
University of Minnesota
charlie at stat.umn.edu



More information about the R-devel mailing list