Re: [R] How to match some patterns in a matrix

2008-04-11 Thread ss
Dear Bert, Thanks a lot for help. I tried and got: > x2[x2[["name"]] %in% y,] [1] name id <0 rows> (or 0-length row.names) > Any suggestions? Alex On Fri, Apr 11, 2008 at 2:49 PM, Bert Gunter <[EMAIL PROTECTED]> wrote: > 1. Strictly speaking, y is a one-column matrix if it has a non-null dim

Re: [R] How to match some patterns in a matrix

2008-04-11 Thread Bert Gunter
1. Strictly speaking, y is a one-column matrix if it has a non-null dim attribute (it also is a vector). 2. ?match or ?"%in%" tells you what to do. x2[x2[["name"]] %in% y,] is what you want. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of ss Sen