[R] remove multiple elements from vector

Marianne Promberger mpromber at psych.upenn.edu
Sun Sep 28 13:51:55 CEST 2008


On Saturday, 27 September 2008, 15:30 (UTC+0200), Bastian Offermann wrote:
> Hello all,
>
> one brief question
>
> I would like to remove double/triple elements from a vector, e.g.
>
> 0 1 1 1 1 2 2 2 4 5 6 6
>
> but keep one of these multiple ones. Should look like this finally:
>
> 0 1 2 4 5 6


?unique


m.



More information about the R-help mailing list