Message-ID: <1341852148567-4635868.post@n4.nabble.com>
Date: 2012-07-09T16:42:28Z
From: Nico902
Subject: unique vs duplicate problem
Hi,
Let say I have a numeric vector: x <- c(1, 2, 3, 3).
I want on one hand numbers which are not duplicated ie "1,2" and duplicated
"3".
so I did:
>duplicated(x)
FALSE FALSE FALSE TRUE
> unique(x)
1 2 3
which is not what I want. Is there a function in R to have the following
result:
>duplicated(x)
FALSE FALSE TRUE TRUE
>unique(x)
1 2
I could do it by programming some loops but I reckon somebody programmed a
function already.
Cheers.
--
View this message in context: http://r.789695.n4.nabble.com/unique-vs-duplicate-problem-tp4635868.html
Sent from the R help mailing list archive at Nabble.com.