[R] stem - strange leaves

Leif Ruckman leif.ruckman at kau.se
Fri Feb 16 09:18:07 CET 2018


> x
[1] 8.0 7.9 7.5 7.0 8.0 7.3 8.0 7.2 7.4 7.3 7.8 8.0 7.7 8.3 7.8 7.8 7.1 7.7 6.9 7.5 7.5 7.3 7.2 7.5 7.2
> stem(x)

  The decimal point is at the |

  6 | 9
  7 | 012223334
  7 | 5555778889
  8 | 00003

> y <- c(x, 8)
> stem(y)

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

  68 | 0
  70 | 00
  72 | 000000
  74 | 00000
  76 | 00
  78 | 0000
  80 | 00000
  82 | 0
The first stem is as I want it to be and expect it to be. When I add one more observation R seems to add an extra decimal zero to my observations and all leaves are now zero. Why does this happen?

Regards
Leif

	[[alternative HTML version deleted]]



More information about the R-help mailing list