Value matching in SAS IML -
say have vector x, , (short) list of values v match against. want find elements of x present in v. example, if
x = {10 11 12 13 12 13 14 15}; v = {12 13};
i want obtain vector {3 4 5 6}
, these being elements of x values either 12 or 13. there simple way this, without having explicit loop on elements of v?
i assume in proc iml. use xsect function find intersection of 2 sets:
z = xsect(x,v);
(and if want difference, use setdif).
btw, there discussion forum dedicated soley sas/iml questions: http://support.sas.com/forums/forum.jspa?forumid=47
Comments
Post a Comment