[R] Stem and leaf display?

Richard Rowe Richard.Rowe at jcu.edu.au
Wed Jul 16 09:11:23 CEST 2003


At 18:08 16/07/03 +1200, Richard A. O'Keefe wrote:
>I would like to do some fairly basic stem-and-leaf displays in R.
>I am aware (I might even say painfully aware) of stem(base) and
>have tried it.  That's why I'm hoping someone has a usable stem-
>and-leaf display for R so that I don't have to write my own.
>
>r-project.org > Search > R Site Search > "stem and leaf display"
>finds nothing.
>
>I also tried the mail archive search, but couldn't figure out how
>to search the bodies of the messages.
>
>For the record, there are some less important things that I would
>like to have (like depths and outlier lines), and it is a pity that
>the "atom" argument of stem() is effectively undocumented (it's a
>tolerance, fine, but what _of_ and how used?),

Source is available ...

>  but I'd put up with stem() the way it is if only it didn't do things 
> like displaying
>5.67 and 5.78 as
>     56 | 78
>which makes it effectively unusable.  What good is a stem and leaf
>plot where you can't recover the leading digits of the numbers correctly?


?????

 > x<-c(5.67, 5.78)
 > stem(x)

   The decimal point is 1 digit(s) to the left of the |

   56 | 7
   57 |
   57 | 8


What are you doing?


Richard Rowe
Senior Lecturer
Department of Zoology and Tropical Ecology, James Cook University
Townsville, Queensland 4811, Australia
fax (61)7 47 25 1570
phone (61)7 47 81 4851
e-mail: Richard.Rowe at jcu.edu.au
http://www.jcu.edu.au/school/tbiol/zoology/homepage.html




More information about the R-help mailing list