Not an exact answer to your question.  You may use a: for amending column,
  (1 4 6 3 2) (<a:;1)} tst
2 1 2
2 4 2
2 6 2
2 3 2
2 2 2
  (1 4 6 3 2) ((<a:;0),(<a:;2))} tst
1 2 1
4 2 4
6 2 6
3 2 3
2 2 2

Sherlock, Ric 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



--
regards,
bill
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to