Kip,  I found my strategy interesting but awkward.  I was going along ok
until I realized I had lost the final  0 .

   ruth=: 54 59 35 41 46 25 47 60 54 46 49 46 41 34 22
   f=: 13 :'<.10%~/:~ y'
   g=: 13 :'(/:~y)-10*f y'
   h=: 13 :'(g y)*"1(~.f y)=/f y'
   i=: 13 :'(0~:(i.5){h y)#"1 (i.5){h y' 
   j=: 13 :'(":,.~.f y),"1''|'',"1 (i y){'' 123456789'''
   
   
   f
[: <. 10 %~ /:~
   g
/:~ - 10 * f
   h
g *"1 ([: ~. f) =/ f
   i
(0 ~: 0 1 2 3 4 { h) (#"1) 0 1 2 3 4 { h
   j
([: ": [: ,. [: ~. f) ,"1 '|' ,"1 ' 123456789' {~ i
   
   j ruth
2|25     
3|45     
4|1166679
5|449    
6|       
   
It was a good exercise, and I now need to work to understand some of the
responses you got.  My first problem is finding out how Raul's 

":@/:~/./|:0 10 #: ruth
4 4 9        
4 5          
1 1 6 6 6 7 9
2 5          
0      

I can see how the rows are in a different order, but I can't figure out how
it works.  I'd like to write an explicit verb that has his result.

Linda


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of km
Sent: Saturday, May 03, 2014 9:35 PM
To: [email protected]
Subject: Re: [Jprogramming] Stemplot

John Tukey was very persuasive about using stemplots by hand for quick looks
at comparatively small data sets.  Even today a stemplot by hand is quicker
than typing in the data.  If you truncate rather than round, it is easy to
get from the stemplot back to the data.  Preliminary versions, written down
quickly, help you sort the data.

Writing a verb for stemplots is an interesting exercise.  I have learned
from attempting it and reading forum attempts.  Will your routine provide
the stemplot shown below?

--Kip Murray

Sent from my iPad

> On May 3, 2014, at 5:43 PM, Devon McCormick <[email protected]> wrote:
> 
> I find histograms very useful and use them often.
> 
> I think Roger's comment is correct: it's an old technique that reflects
the
> limitations of an earlier time: http://en.wikipedia.org/wiki/Stemplot .
> 
> 
>> On Sat, May 3, 2014 at 10:17 AM, km <[email protected]> wrote:
>> 
>> Thank you, Brian, I hadn't seen your paper.  A lot of hard work went into
>> it!
>> 
>> Another example:
>> 
>> Noun hispct below shows by state the year 2000 percent of population that
>> was of Hispanic origin.  For example, the percents for Alabama, Alaska,
and
>> Arizona were
>> 1.5, 4.1, and 25.3 .  Outliers California, New Mexico, and Texas (32.4,
>> 42.1, and 32.0) have been omitted, and a spurious 9.9 is added to the
>> display below.
>> 
>>    3 16 $ hispct,99
>> 15 41 253 28 171 94 48 168 53 72  79 107  35  28 70 15
>> 24  7  43 68  33 29 13  21 20 55 197  17 133 151 47 12
>> 19 52  80 32  87 24 14  20 90  9  47  72   7  36 64 99
>> 
>>    stemplot hispct
>>  0|7 7 9
>>  1|2 3 4 5 5 7 9
>>  2|0 0 1 4 4 8 8 9
>>  3|2 3 5 6
>>  4|1 3 7 7 8
>>  5|2 3 5
>>  6|4 8
>>  7|0 2 2 9
>>  8|0 7
>>  9|0 4
>> 10|7
>> 11|
>> 12|
>> 13|3
>> 14|
>> 15|1
>> 16|8
>> 17|1
>> 18|
>> 19|7
>> 20|
>> 21|
>> 22|
>> 23|
>> 24|
>> 25|3
>> 
>> --Kip Murray
>> 
>> Sent from my iPad
>> 
>>> On May 3, 2014, at 6:08 AM, Brian Schott <[email protected]> wrote:
>>> 
>>> Kip,
>>> 
>>> Have you looked at the following link?
>>> 
>>> http://www.jsoftware.com/jwiki/BrianSchott/Stemplot
>>> 
>>> 
>>> 
>>> --
>>> (B=)
>>> ----------------------------------------------------------------------
>>> For information about J forums see http://www.jsoftware.com/forums.htm
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
> 
> 
> 
> -- 
> Devon McCormick, CFA
> ----------------------------------------------------------------------
> 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