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

About this list Date view Thread view Subject view Author view Attachment view

From: pallier (pallier@lscp.ehess.fr)
Date: Wed 05 May 2004 - 17:29:44 EST


Message-id: <409897E8.1030303@lscp.ehess.fr>

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

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Mon 31 May 2004 - 23:05:07 EST