[R] Duplicated non contiguous element in a list

Bruno C. bruno.c at inwind.it
Fri Mar 16 17:14:13 CET 2007


Hello,

Given a vector I would like to rapidly identify duplicated non contiguous elements.
Given for example
c(1,    1,    2,   3,    2,   4,   5,   6,    4) 
I would like to get:
FALSE FALSE TRUE FALSE TRUE TRUE FALSE FALSE TRUE

In fact I need to check this on the columns of a matrix!
I can do that of couse with loops but is there any function already available?

Thanks


------------------------------------------------------
Passa a Infostrada. ADSL e Telefono senza limiti e senza canone Telecom
http://infostrada.it



More information about the R-help mailing list