Re: [R] conditional matching of rows of tables

2008-03-20 Thread jim holtman
ot;0" and "4" of 1st row of matrix A. Thus 1st row of matrix B is > assigned "a". Similarly, the assignments for remaining rows of matrix B are > 2 4 5 -> "b" > 2 0 3 -> "a" > 1 7 8 -> "b" > > > > -Original Mes

Re: [R] conditional matching of rows of tables

2008-03-20 Thread Stanley Ng
of matrix A. Thus 1st row of matrix B is assigned "a". Similarly, the assignments for remaining rows of matrix B are 2 4 5 -> "b" 2 0 3 -> "a" 1 7 8 -> "b" -Original Message- From: jim holtman [mailto:[EMAIL PROTECTED] Sent: Friday, Mar

Re: [R] conditional matching of rows of tables

2008-03-20 Thread jim holtman
Not exactly clear on the transformation that you want to do. In your example, '1 2 3 -> a', where does the '2 3' come from since I don't see a value of 2 in the 3rd & 4th columns. So a better explanation of what you are trying to do would be help and show where the values came from in each case.

[R] conditional matching of rows of tables

2008-03-20 Thread Ng Stanley
Hi, Given matrix A of 4 cols. 1 a 0 4 1 b 5 8 2 a 0 3 2 b 4 7 I have another matrix B of 3 cols. How to assign (a or b) to the rows such that in each row its 1st value must match the 1st col. of A, 2nd and 3rd values must lie between 3rd and 4rd cols (inclusive) of A 1 2 3 -> a 2 4 5 -> b 2 0 3