I am trying to join 4 graphs with the layout function. However, I only get 3 represented: all except the stem and leaf diagram.
In brief, this is what it looks like in r:
layout(matrix(c(1,2,3,4), 2, 2, byrow =TRUE))
stem(graph1)
boxplot(graph2)
hist(graph3)
barplot(graph4)
Why doesn't the stem graph plot the same as the others, and is there another function that can do it?
Thank you in advance
As @DaveArmstrong already hinted,
stem
outputs characters, which are printable but not plotable.You could redirect the output from
stem
to a plot like so (shamelessly stolen from this SO answer):