Raul, Your reply is exactly what I wanted!  I just thought my explanation had 
been confusing so I gave more details. Your functions are both fine and after I 
have a chance to ponder a while, I'll let you know what my "elementary" take on 
it is.  Thanks.  I have lots of old pictures and I don't know when they were 
taken.  When I don't know who someone is, knowing the old relatives ages helps 
to elimate ones who weren''t alive at the time of the picture. (Probably too 
much information)  Thanks again.  Linda

-----Original Message-----
From: Programming [mailto:[email protected]] On Behalf 
Of Raul Miller
Sent: Monday, June 27, 2016 12:20 AM
To: Programming forum
Subject: Re: [Jprogramming] Rearranging rows of tables

Here is the behavior I implemented:

   D f 1
+--+----+--+
|18|GOAT|10|
+--+----+--+
|27|BAT |9 |
+--+----+--+
|30|CAT |11|
+--+----+--+
   D f 3
+--+----+--+
|27|BAT |9 |
+--+----+--+
|18|GOAT|10|
+--+----+--+
|30|CAT |11|
+--+----+--+

Your "I guess I should explain better" comment suggests that that what I 
implemented is *not* what you want.

But your following description seems to me to be claiming that what I 
implemented *is* what you want.

So I am a bit confused now.

Is there anything you can do to help me resolve this implied contradiction?

Thanks,

--
Raul

On Sun, Jun 26, 2016 at 9:20 PM, Linda A Alvord <[email protected]> wrote:
> I guess I should explain better.  If column 1 is a birth year, and 
> column 3 is a death year. I want to rearrange the rows from smallest 
> to largest (or maybe someday from largest to smallest).  Column 2 
> would be person's name.a
>
> Let me know if this still isn't clear.  Linda
>
> -----Original Message-----
> From: Programming [mailto:[email protected]] On 
> Behalf Of Raul Miller
> Sent: Sunday, June 26, 2016 9:04 PM
> To: Programming forum
> Subject: Re: [Jprogramming] Rearranging rows of tables
>
> s
>
> p
>
> o
>
> i
>
> l
>
> e
>
> r
>
>
> s
>
> p
>
> a
>
> c
>
> e
>
> .
>
> .
>
> .
>
> .
>
> .
>
> .
>
> .
>
> .
>
> .
>
> .
>
> f=: [ /: <:@] {"1 [
>
> Or, if you prefer:
>
> f=: dyad def 'x /: (y-1) { |:x'
>
> Thanks,
>
> --
> Raul
>
>
> On Sun, Jun 26, 2016 at 8:50 PM, Linda A Alvord <[email protected]> 
> 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
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
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