[Jprogramming] Rearranging rows of tables

Henry Rich henryhrich at gmail.com
Mon Jun 27 00:59:03 UTC 2016


f =: [ /: {"1~

untested.

Henry Rich


On 6/26/2016 8:50 PM, Linda A Alvord wrote:
> Design a function f, so D f 3 will arrange the rows in order from small to
> large values in column 3 andD f 1 will do the same for column 1.
>
>   
>
>   
>
> A=:(<30),(<'CAT'),<11
>
> B=:(<18),(<'GOAT'),<10
>
> C=:(<27),(<'BAT'),<9
>
> [D=:A,B,:C
>
> ---T----T--┐
>
> │30│CAT │11│
>
> +--+----+--+
>
> │18│GOAT│10│
>
> +--+----+--+
>
> │27│BAT │9 │
>
> L--+----+---
>
>   
>
> If you prefer 3 f D and 1 f D,  that's OK.  Thanks, Linda
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm



More information about the Programming mailing list