$x must be a suffix of $m{y
1 4 6 3 2 (1 })"0 1 tst
2 1 2
2 4 2
2 6 2
2 3 2
2 2 2
1 4 6 (1 }) tst
2 2 2
1 4 6
2 2 2
2 2 2
2 2 2
1 (1 }) tst
2 2 2
1 1 1
2 2 2
2 2 2
2 2 2
1 (0 }) ,:tst
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
--- "Sherlock, Ric" <[EMAIL PROTECTED]> wrote:
> When using x m}"1 y to amend columns of y.
> Why can m only be a single-item list (rank 1) and why does x need to be
> rank 2?
>
> e.g.
> ]tst=:(5 3$2)
> 2 2 2
> 2 2 2
> 2 2 2
> 2 2 2
> 2 2 2
> (1 4 6 3 2) (1)}"1 tst
> |rank error
> | (1 4 6 3 2) (1)}"1 tst
> (1 4 6 3 2) (,1)}"1 tst
> |length error
> | (1 4 6 3 2) (,1)}"1 tst
> (,.1 4 6 3 2) (,1)}"1 tst
> 2 1 2
> 2 4 2
> 2 6 2
> 2 3 2
> 2 2 2
> (,.1 4 6 3 2) (0 2)}"1 tst
> |length error
> | (,.1 4 6 3 2) (0 2)}"1 tst
>
> Yet the following are fine?
> |: (1 4 6 3 2) (1)} |: tst
> 2 1 2
> 2 4 2
> 2 6 2
> 2 3 2
> 2 2 2
> |: (1 4 6 3 2) (0 2)} |: tst
> 1 2 1
> 4 2 4
> 6 2 6
> 3 2 3
> 2 2 2
>
> I suspect this has to do with making sure the prefixes of the left &
> frames right frames match. Am I on the right track?
>
> Is working with the transpose the best way to accomplish something like
> this?
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm