Description Usage Arguments Value Author(s) References See Also Examples
Create a stem-and-leaf plot where the stems can be grouped by multiple values and the leaves indicate where the values are split
1 2 3 4 | grouped_stem(invec, n = 2)
## S3 method for class 'grouped_stem'
print(x, ...)
|
invec |
The input vector. This function only works with integers. |
n |
The number of stem values to be grouped |
x |
The object to be printed. |
... |
Not used. |
A list
printed with stem-and-leaf formatting
Ananda Mahto
https://stackoverflow.com/q/62044245/1270695
1 2 3 4 5 6 7 8 9 | set.seed(1)
data_pos <- sample(0:50, 100, TRUE)
grouped_stem(data_pos, 2)
data_neg <- sample(-50:-1, 100, TRUE)
grouped_stem(data_neg, 2)
data_pos_neg <- c(0, sample(-50:50, 100, TRUE))
grouped_stem(data_pos_neg, 3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.