Skip to content

Interpreting message: Error in names<-.default(*tmp*, value = cols) :

2 messages · David White, Uwe Ligges

#
I have an error message that I don't know how to interpret.

The message is:
Error in names<-.default(*tmp*, value = cols) :
        names attribute must be the same length as the vector

I have written a complicated analysis algorithm to examine a large
dataset. The analysis appears to run on small numbers of tokens, say 10.

I suppose my question is: which function(s) might kick out such an error?

Many thanks.

David
S. David White
sdavidwhite at bigfoot.com
Columbus, Ohio

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
David White wrote:
For example, when names are assigned to vectors:

 temp <- 1:10
 names(temp) <- "Hello"

Error in "names<-.default"(*tmp*, value = "Hello!") : 
        names attribute must be the same length as the vector


This might happen in very different cases, so you might want to make use
of debug() or traceback().

Uwe Ligges
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._