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

Uwe Ligges ligges at statistik.uni-dortmund.de
Tue Jul 10 23:04:28 CEST 2001


David White wrote:
> 
> 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?


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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list