Kip, I enjoyed this problem.  I created the following script to randomly
generate lists and then create the stemplot.  Save in a new jijx.  Then run
it.  Remove the  NB. in the second line to see another example. Do the same
for the third line.  Removing the NB. from the fourth line will generate new
data.  Hopefully it won't fail.  Id appreciate inprovements within simple J
from anyone.

D=:/:~ 17 133 151 47 12 19 52 80 32 87 24 14 20 90 9 47 72 7 36 64
NB.D=:/:~50 83 95 107 113 113 116 116 118 123
NB.D=:11 11 31 73 74 92 104 114 129 133
NB.D=:/:~ (>:?15)+?10#140

sl=: 13 :'''S L''=:|:0 10#:y'
sl D
S
L

]DO=:(<./S)+i.>:(>./S)-<./S

]WL=:":,.(DO e. S)#DO

]WOL=:":,.(-.DO e. S)#DO

]SS=:(|."1(|."1 WL),|."1 WOL),.'|'

]LS=:S ":/. L

]NLS=:((0{$WOL),1{$LS)$' '

]SP=: SS,. LS, NLS

]OS=: (".0 1{"1 SS)-0{DO

]G=: OS i. i.$DO

]GOOD=:G {"2 SP

]D 

In these days I guess you could call it a stem plot "app".  In any case,
when you understand any steps you can remove  ]  from a given line and it
will no longer provide that result.  Eventually, if you remove them all, you
can make a stem plot of two digit numbers. I would have able to develop this
and then use it in a high school Probability and Statistics class.

Linda


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Kip Murray
Sent: Friday, May 09, 2014 3:36 PM
To: [email protected]
Subject: Re: [Jprogramming] Table Adverb

But not a random mess.  We can observe

   0 1 2 3 (+ %)/ 0 1 2 3
_ 2 2.5 3.33333

   0 1 2 3 (+ %)"0/ 0 1 2 3  NB. notice the diagonal
_ 1 0.5 0.333333
_ 2 1.5  1.33333
_ 3 2.5  2.33333
_ 4 3.5  3.33333

   0 1 2 3 (+ %)table 0 1 2 3
+---+----------------------+
|+ %|0                     |
+---+----------------------+
|0  | 1 2 3 _ 2 2.5 3.33333|
|1  |                      |
|2  |                      |
|3  |                      |
+---+----------------------+

The body above is (part of "expected" heading) , diagonal .  Perhaps a new
table adverb could restore 1 2 3 to the heading and display _ 2 2.5 3.33333
as the diagonal of the body, with spaces elsewhere in the body.

Or perhaps not.  I don't know whether the behavior of  (+ %)/ above is
typical for rank infinity arguments to adverb / .

On Friday, May 9, 2014, Roger Hui <[email protected]> wrote:

> I believe the table adverb assumes that the verb has rank 0.  If it does
> not, then you get a mess.  Y'know: GIGO.
>


-- 
Sent from Gmail Mobile
----------------------------------------------------------------------
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