[R] to remove duplicate values

Moohwan Kim kmhlmj2 at gmail.com
Mon Jul 5 23:04:21 CEST 2010


Dear R family,

Suppose I have two series.

order value
1  0.52
2  0.23
3  0.43
4  0.21
5  0.32
6  0.32
7  0.32
8  0.32
9  0.32
10 0.12
11 0.46
12 0.09
13 0.32
14 0.25

For these two series, I figured out the way to detect the locations of
duplicate values.
The next thing to do is remove the repeated values except for a value
that would not be next to each other.
In other words, while keeping the 13th value, I want to remove
observations from 6th to 9th.
That is my end goal.

Could you help me reach the goal?

best
moohwan



More information about the R-help mailing list