[R] little question

Olivier Martin olivier.martin at inrialpes.fr
Thu Apr 26 19:39:32 CEST 2001

Hi all,

i have a little pb but i don t find  how i can solve it..
this is..
i have two vectors x and yn and they don t have the same length...
(i suppose length(x)>length(y))
this is what i want to do.
i suppose that
x=c(10,1,2,3,7,9,1,4,2,11,2,10) and y=c(1,2,4,10)
i want to find all the numbers of rows i of x for which x[i] exists in y
 i.e. in this case ...rep=(1,2,3,7,8,9,11,12)

Best regards,

Olivier MARTIN               phone: (33) 04 76 61 53 55
Projet IS2                               06 08 67 93 42
INRIA Rhone-Alpes            fax  : (33) 04 76 61 54 77
655, Av. de l'Europe
Montbonnot                  e-mail:olivier.martin at inrialpes.fr
38334 Saint Ismier cedex

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://stat.ethz.ch/pipermail/r-help/attachments/20010426/df9eddea/attachment.html

More information about the R-help mailing list