1、茎叶图(stem)
如:stem(x,scale=2,width=4)
(1)x为数据向量
(2)scale控制茎叶图的长度,默认为scale=1,若选择scale=2则表示将各位数拆成两段来计数,其中0~4为一段,5~9为一段,其他scale的值类似
(3)width表示所绘茎叶图数据的宽度,即茎叶
d=read.delim("D:/csdn/exam1.2.txt",header=T)
attach(d)
stem(urban)
> stem(urban)
The decimal point is 1 digit(s) to the right of the |
0 | 056
1 | 1122568
2 | 01234456699
3 | 24569
4 | 00123344455667789
5 | 01134466778
6 | 0000122345788899
7 | 001122233445557778
8 | 12344455556999
9 | 112466
10 | 0
stem(urban,scale=2)
> stem(urban,scale=2)
The decimal point is 1 digit(s) to the right of the |
0 | 0
0 | 56
1 | 1122
1 | 568