用R画直方图,箱形图,条形图

2026-02-11 23:37:31

1、用R画直方图,语言如下:

x<-c(2,4,5,7,9,33,23,22)

hist(x,main="histogram of x")

用R画直方图,箱形图,条形图

2、用R画箱形图,语言如下:

x<-c(2,4,5,7,9,33,23,22)

boxplot(x,main="distribution of x")

用R画直方图,箱形图,条形图

3、用R画条形图,语言如下:

x<-c(2,4,5,7,9,33,23,22)

barplot(x,main="distribution of x")

用R画直方图,箱形图,条形图

猜你喜欢