[R] Why aren't row names in a data frame unique?
jim at bitwrit.com.au
Tue Mar 6 10:42:43 CET 2012
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.
An example of how you managed to do this would be helpful. I tried it:
1 1 4
2 2 5
3 3 6
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’
More information about the R-help