x =. 3 2 $ 1 1 2 1 3 2 ]x 1 1 2 1 3 2 ]y =. 3 2 $ 1 1 2 2 3 3 1 1 2 2 3 3
x rajoin y would mean (in my case) 1 1 1 [first row of x joined with first row of y -match of x(0,1) & y(0,0) ] 2 1 1 [second row of x joined with first row of y -match of x(1,1) & y(0,0) ] 3 2 2 [third row of x joined with second row of y -match of x(2,1) & y(1,0)] I did not understand what you ment by row headers versus column headers. I think what I have done above is the join as in db tables. On 10/23/06, Pascal Jasmin <[EMAIL PROTECTED]> wrote:
is the result you are looking for: 1 1 1 2 1 2 3 2 3 instead? SQL would generally use a column name to join 2 tables. In your case there are matching row headers, and so the above would be as SQL-like of a merge ... and could handle one array being out of order from the 2nd. Perhaps if the result below is what you want, perhaps you can describe the logical basis for your merge method. ----- Original Message ---- From: Yuvaraj Athur Raghuvir <[EMAIL PROTECTED]> > x =. 3 2 $ 1 1 2 1 3 2 > y =. 3 2 $ 1 1 2 2 3 3 > ]r=. x rajoin y > 1 1 1 > 2 1 1 > 3 2 2 ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
