The verb "ranking" has to be applied to each
column of the argument.
----- Original Message -----
From: Brian Schott <[EMAIL PROTECTED]>
Date: Thursday, May 17, 2007 9:44 pm
Subject: Re: [Jprogramming] Multi sort
> /: ranking x
> 1 0 3 2 4 5
>
> On Thu, 17 May 2007, Roger Hui wrote:
>
> + ] x=: 10,. 6 [EMAIL PROTECTED] 5
> + 10 1
> + 10 0
> + 10 4
> + 10 2
> + 10 4
> + 10 4
> + ] i=: /: /:^:2"1&.|: x
> + 0 1 2 3 4 5
> + i{x
> + 10 1
> + 10 0
> + 10 4
> + 10 2
> + 10 4
> + 10 4
> + ranking=: i.!.0~ { /:@/:
> + ] j=: /: ranking"1&.|: x
> + 1 0 3 2 4 5
> + j{x
> + 10 0
> + 10 1
> + 10 2
> + 10 4
> + 10 4
> + 10 4
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm