[R] length of dimnames???

Jean-Pierre Gattuso gattuso at obs-vlfr.fr
Fri Jan 18 17:01:34 CET 2002


Hi:

I have made a lot of progress reading and manipulating large data 
files, thanks to the help of several of you. I am now stuck with 
writing the final file with the following error (see also the full 
transcript below):

	Error in as.matrix.data.frame(x) : length of dimnames[2] not 
equal to array extent

I do not know what it means and could not find how to get around that 
in the manual nor in the R search page.

Any idea?

Thanks,
jp

-----------------------------
>  frame1 <- read.table("/Users/gattuso/zRdata/coca/oceanic.txt", 
>header=TRUE,sep=",")
>  frame2 <- read.table("/Users/gattuso/zRdata/coca/cellids.txt", 
>header=TRUE,sep=",")
>  frame1$celltype <- frame2[match(frame1$ID,frame2$ID),2]
>  frame1$cellid <- frame2[match(frame1$ID,frame2$ID),3]
>  frame1$zone <- frame2[match(frame1$ID,frame2$ID),6]
>  frame1$area <- frame2[match(frame1$ID,frame2$ID),7]
>  frame1$perimeter <- frame2[match(frame1$ID,frame2$ID),8]
>  write.table(frame1, file = 
>"/Users/gattuso/zRdata/coca/oceanictest.txt", sep = ",",eol = "\n")
Error in as.matrix.data.frame(x) : length of dimnames[2] not equal to 
array extent

-- 
____________________________________________________________________
Jean-Pierre Gattuso
Laboratoire d'Océanographie de Villefranche, UMR 7093 CNRS-UPMC
B. P. 28, F-06234 Villefranche-sur-mer Cedex - France
Voice: +33 (0)493763859 - Fax: +33 (0)493763834
<mailto:gattuso at obs-vlfr.fr> - http://www.obs-vlfr.fr/~gattuso
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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