[R] duplicate 'row.names' are not allowed
S Ellison
S.Ellison at lgc.co.uk
Tue Apr 28 18:46:07 CEST 2009
Apologies; my earlier reply preceded this extra info.
If you are reading a large file with duplicate "row names", try reading
it in as is, then simply converting the numeric parts to a matrix.
For example, if you had the same kind of data frame as before
x1 <- rnorm(11,5,1)
x2 <- runif(11,0,1)
nam <- nam<-paste("A", c(1:4,4,5:9,9), sep=".")
mydata <- data.frame(nam=nam, x1=x1,x2=x2)
as.matrix(mydata[,2:3])
works.
You can also do this on the fly, as in
biplot(prcomp(as.matrix(mydata[,2:3])))
to take a very silly example.
>>> amor Gandhi <amorigandhi at yahoo.de> 28/04/2009 14:03 >>>
Yes, I would like, but what I sent you was just an example! I am
reading a huge data, so I cant do it by hand, could you please tell how
to do this in R, some of the names are also coming one after another.
Many thanks
*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}
More information about the R-help
mailing list