[R] Finding Source of Error Message of 'Non-Unique Index Entries'

David Winsemius dwinsemius at comcast.net
Tue Jan 3 19:02:42 CET 2012


On Jan 3, 2012, at 12:26 PM, Rich Shepard wrote:

> On Tue, 3 Jan 2012, David Winsemius wrote:
>
>>> How can I identify the non-unique index entries within R?
>>
>> ?duplicated
>
>  Thank you, David.
>
>  I _think_ the problem comes from a duplated factor column in the data
> frame. Now I need to figure out how subset() generated that additional
> column.

A subsetting vector could contain (or perhaps cause "[" to create)   
duplicates.

data.frame(a=1:10)[ seq(1,10, by=0.5),]
  [1]  1  1  2  2  3  3  4  4  5  5  6  6  7  7  8  8  9  9 10



-- 


David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list