newcol 1}"0 1 table

--- "Sherlock, Ric" <[EMAIL PROTECTED]> wrote:

> Hi,
> Am new to J (from APL) and am having trouble with selective assignment .
> I understand that in J the equivalent is to use Amend. 
> Given:
>    ]table=.4 2$ ;:'taa tas ewe wtw tweqewqwq 4212 fgsaera jihjy'
>    ]newcol=. ;:'mean to been formed'
>    ]newrow=. ;:'thra rowskd'
> 
> Lets say I want to replace the 2nd column of table with a new column.
> The following works:   
>    newcol (0 1;1 1;2 1;3 1)}table
> 
> But this doesn't:
>    newcol 1}"1 table
> |rank error
> |   newcol     1}"1 table
> 
> But does work for a row
>    newrow 1} table
> Or
>    newrow 1}"2 table
> 
> The following works but seems cludgey 
>    |: newcol 1} |: table
> 
> I have a feeling that maybe my understanding of rank isn't quite right
> yet! Can anyone help?
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
> 



 
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to