How to implement Stem- Leaf Plot in R?

Description

To implement the stem- leaf plot using R programming.

Stem and Leaf plot:

  • Each numeric value is split into a stem
    (First digit(s) ) and a leaf (last Digit).
  • 57 will split into 5 as stem and 7 as leaf.
  • R Function : stem()

#Stem and Leaf Plot
#Input Data
input<-ChickWeight$weight
print(input)

#Stem Function
stem(input)

#Adding Scale to the plot
stem(input,scale=2)

#Adding Width to the plot
stem(input,scale=2, width= 20)

Leave Comment

Your email address will not be published. Required fields are marked *

clear formSubmit