On 03/06/2012 06:42 PM, Ajay Askoolum wrote:
I expected the row names to be unique but a data frame appears to be able to hold duplicate row names. This makes me thing that there must be circumstances when it is necessary. However, I cannot think of any. Please enlighten me.
Hi Ajay, An example of how you managed to do this would be helpful. I tried it: dodo<-data.frame(a=1:3,b=4:6) dodo a b 1 1 4 2 2 5 3 3 6 rownames(dodo)<-c("s","t","s") Error in `row.names<-.data.frame`(`*tmp*`, value = value) : duplicate 'row.names' are not allowed In addition: Warning message: non-unique value when setting 'row.names': āsā Jim ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.