Your "purely numeric" approach handles 7 and 9 just fine. NB. "purely numeric" approach 2-~(+1%*)/:~(~.@[,./:~/.)/|:>:0 10#:data 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 _ _ _ 13 3 _ _ _ 15 1 _ _ _
NB. Compare stemplot data 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|1 Can you add in the "empty stems" 10 11 12 14 ? --Kip On Wednesday, May 7, 2014, Raul Miller <[email protected]> wrote: > data=: 17 133 151 47 12 19 52 80 32 87 24 14 20 90 9 47 72 7 36 64 > > Here's one approach: > 3 1}._1 _1}.~.":a:,/:~(~.@[;"_1":@/:~/.)/|:0 10#:data > > Here's a "purely numeric" approach: > 2-~(+1%*)/:~(~.@[,./:~/.)/|:>:0 10#:data > > Note that both of these approaches assume that all values are larger than > 9. > > Hopefully it's obvious how to construct verbs based on these sentences. > > Thanks, > > -- > Raul > > On Wed, May 7, 2014 at 2:03 AM, Kip Murray > <[email protected]<javascript:;>> > wrote: > > I am sorry that I mostly did not respond to your stemplot efforts. I was > > having trouble with my email client and am now using gmail. > > > > I didn't specify that gaps in the stems should be filled in with empty > > "stems" in the stemplot, as shown below. Would you be willing to revise > > your solutions? I should be able to respond now. The request is for a > > stemplot verb. > > > > data =: 17 133 151 47 12 19 52 80 32 87 24 14 20 90 9 47 72 7 36 64 > > > > stemplot data > > 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|1 > > > > Here is the original (incomplete) specification. > > > > From Moore and McCabe, Introduction to the Practice of Statistics, Fourth > > Edition, page 20 -- > > > > To make a "stemplot": > > > > 1. Separate each observation into a "stem" consisting of all but the > final > > (rightmost) digit and a "leaf", the final digit. Stems may have as many > > digits as needed, but each leaf contains only a single digit. > > > > 2. Write the stems in a vertical column with the smallest at the top, and > > draw a vertical line at the right of this column. > > > > 3. Write each leaf in the row to the right of its stem, in increasing > order > > out from the stem. > > > > > > -- > > 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 > -- Sent from Gmail Mobile ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
