options(digits=3)
a=c(20,23,20,24,23,21,22,25,26,20,21,21,22,22,23,22,22,24,25,21,22,21,24,23)
b=table(a)
b1=as.vector(b)
c=prop.table(table(a))
c1=as.vector(c)
x=data.frame(b1,c1)
dimnames(x)=list(c('20','21','22','23','24','25','26'),c("频数","频率"))
x
> x
频数 频率
20 3 0.1250
21 5 0.2083
22 6 0.2500
23 4 0.1667
24 3 0.1250
25 2 0.0833
26 1 0.0417




雷达卡








京公网安备 11010802022788号







