Yes,  I tried it and it worked. 

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Kip Murray
Sent: Friday, May 16, 2014 10:00 AM
To: [email protected]
Subject: Re: [Jprogramming] Stemplot

Did you notice I had  _  1  _  while you had  _1  _  ?

On Friday, May 16, 2014, Linda Alvord <[email protected]> wrote:

>  I got this far:
>
>    S=:2 2 2 3 4
>    L=:3 4 8 3 7
>
>    le2=: 13 :'(=x) ([: ": #)"_1 y'
>    S     le2 L
> |length error: le2
> |   S     le2 L
> |[-4] c:\users\owner\j801-user\temp\137.ijs
>
>
> But missed the second  _
>
>    le2=: 13 :'(=x) ([: ": #)"_1 _ y'
>    S     le2 L
> 3 4 8
> 3
> 7
>
> Then this woke me up.
>
>      5!:4 <'le2'
>   ┌─ ]
>   │                  ┌─ [:
>   │           ┌──────┼─ ":
> ──┼─ ~ ─── " ─┤      └─ #
>   │           └─ _1 _
>   │     ┌─ [:
>   └─────┼─ =
>         └─ [
>
>
> Thanks,  Linda
>
> -----Original Message-----
> From: [email protected] <javascript:;> [mailto:
> [email protected] <javascript:;>] On Behalf Of Kip
> Murray
> Sent: Friday, May 16, 2014 2:56 AM
> To: [email protected] <javascript:;>
> Subject: Re: [Jprogramming] Stemplot
>
> Try
>
>    le2=: 13 :'(=x) ([: ": #)"_ 1 _ y'
>    S le2 L
> 3 4 8
> 3
> 7
>
> You need to review the ranks of u@v and [: u v .  I used (":@#) b. 0 to
> find the ranks I used above.
>
> On Thursday, May 15, 2014, Linda Alvord 
> <[email protected]<javascript:;>>
> wrote:
>
> > Here's an odd behavior.  Why doesn't  le2  behave the same as  le3?
> >
> >
> > S=:2 2 2 3 4
> >
> > L=:3 4 8 3 7
> >
> >    NB.   x u/.y ↔ (=x) u@# y
> >
> >    le3=: 13 :'(=x) ":@ # y'
> >    ]LE3=: S le3 L
> > 3 4 8
> > 3
> > 7
> >
> >    le2=: 13 :'(=x) ([: ": #) y'
> >    ]LE2=: S le2 L
> > 3 4 8
> > 3 0 0
> > 7 0 0
> >
> >    le=: 13 :'x ": /. y'
> >    ]LE=:S le L
> > 3 4 8
> > 3
> > 7
> >
> > 5!:4 <'le3'
> >    5!:4 <'le3'
> >   ┌─ ]
> >   │           ┌─ ":
> >   ├─ ~ ─── @ ─┴─ #
> > ──┤
> >   │     ┌─ [:
> >   └─────┼─ =
> >         └─ [
> >
> >    5!:4 <'le2'
> >   ┌─ ]
> >   │          ┌─ [:
> >   ├─ ~ ──────┼─ ":
> > ──┤          └─ #
> >   │     ┌─ [:
> >   └─────┼─ =
> >         └─ [
> >
> >    5!:4 <'le'
> > ── /. ─── ":
> >
> > Linda
> >
> >
> >
> >
> > -----Original Message-----
> > From: [email protected] <javascript:;> [mailto:
> > programming- <javascript:;>
> > [email protected] <javascript:;>] On Behalf Of Linda Alvord
> > Sent: Tuesday, May 13, 2014 4:14 AM
> > To: [email protected]
> > Subject: Re: [Jprogramming] Stemplot
> >
> > Here's the first 4 lines with a line feed.  Linda
> >
> > 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
> >
> > -----Original Message-----
> > From: [email protected]
> > [mailto:[email protected]] On Behalf Of Linda
> > Alvord
> > Sent: Monday, May 12, 2014 11:29 PM
> > To: [email protected]
> > Subject: Re: [Jprogramming] Stemplot
> >
> > Here's where this belongs.
> >
> > ip, 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: Wednesday, May 07, 2014 9:47 AM
> > To: [email protected]
> > Subject: Re: [Jprogramming] Stemplot
> >
> > You somehow lost the leaf 1 from data item 151 (an "off by 1" error?).
> >  Last row of answer should be 15 1 _ _ _  Sorry about line wrap.  --Kip
> >
> >    NB. Actually... this isn't any shorter, but it feels cleaner:
> >
> >    2-~(+1%*)/:~(~.@[,./:~@}:/.)/|:>:0 10#:data,10*i.>./<.data%10
> >  0 7 9 _ _
> >  1 2 4 7 9
> >  2 0 4 _ _
> >  3 2 6 _ _
> >  4 7 7 _ _
> >  5 2 _ _ _
> >  6 4 _ _ _
> >  7 2 _ _ _
> >  8 0 7 _ _
> >  9 0 _ _ _
> > 10 _ _ _ _
> > 11 _ _ _ _
> > 12 _ _ _ _
> > 13 3 _ _ _
> > 14 _ _ _ _
> > 15 _ _ _ _
> >
> >    NB. Thanks,
> >
> >    stemplot data
> >  0|7 9
> >  1|2 4 7 9
> >  2|0 4
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm



-- 
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