stem.leaf {Rcmdr}R Documentation

Stem-and-Leaf Display

Description

Creates a classical ("Tukey-style") stem-and-leaf display.

Usage

stem.leaf(data, unit, m, Min, Max,
    rule.line = c("Dixon", "Velleman", "Sturges"),
    style = c("Tukey", "bare"), trim.outliers = TRUE, depths = TRUE,
    reverse.negative.leaves = TRUE)

## S3 method for class 'stem.leaf':
print(x, ...)

Arguments

data a numeric vector.
unit leaf unit, as a power of 10 (e.g., 100, .01); omit to let the function choose the unit.
m number of parts (1, 2, or 5) into which each stem should be divided; omit to let the function choose the number of parts/stem.
Min smallest non-outlying value; omit for automatic choice.
Max largest non-outlying value; omit for automatic choice.
rule.line the rule to use for choosing the desired number of lines in the display; "Dixon" = 10*log10(n); "Velleman" = 2*sqrt(n); "Sturges" = 1 + log2(n); the default is "Dixon".
style "Tukey" (the default) for "Tukey-style" divided stems; "bare" for divided stems that simply repeat the stem digits.
trim.outliers if TRUE (the default), outliers are placed on LO and HI stems.
depths if TRUE (the default), print a column of "depths" to the left of the stems; the depth of the stem containing the median is the stem-count enclosed in parentheses.
reverse.negative.leaves if TRUE (the default), reverse the leaves on negative stems (so, e.g., the leaf 9 comes before the leaf 8, etc.).
x an object of class stem.leaf to be printed.
... not used: for compatibility with the generic print function.

Details

Unlike the stem function in the base package, this function produces classic stem-and-leaf displays, as described in Tukey's Exploratory Data Analysis. Outliers are determined using the rule for boxplots (see boxplot.stats).

Value

Returns on object of class stem.leaf, which normally would be printed.

Author(s)

Peter Wolf, slightly modified by John Fox jfox@mcmaster.ca with the original author's permission.

References

Tukey, J. Exploratory Data Analysis. Addison-Wesley, 1977.

See Also

stem

Examples

data(Prestige)
stem.leaf(Prestige$income)

[Package Rcmdr version 1.1-6 Index]