[R] anyone know how to combine two vector with some # overlaped?

pallier pallier at lscp.ehess.fr
Wed May 5 09:29:44 CEST 2004


Mike wrote:

>Hi, there,
>
>Suppose I have two vector say x=c(1 2 3 4 5) and y=(2
>3 6 7). Then I want to combine these two vector
>together and get z=c(1 2 3 4 5 6 7) with 2 and 3 only
>appear once.
>
union(x,y)

R provides several set operators. See ?union.

Christophe Pallier




More information about the R-help mailing list