If the array is large it is perhaps best to do it in-place:

    a =. i. 4 4
    a =. (2 { a) (<a:;1)} a
    a
  0  8  2  3
  4  9  6  7
  8 10 10 11
12 11 14 15

Henry Rich

adam dunne wrote:
> Given a square table a=.i.4 4 is it possible, in one line, to replace
> 
> Column 1 with row 2, using a gerund or directly. I seem to get rank errors.
> 
> 
> 
> -Adam Dunne
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
> 
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to