x=iris[,1:4]
summary(x)
我该如何做到这一点?
我用这个:
Sepal.Length=c("Min. :4.300","1st Qu.:5.100","Median :5.800","Mean :5.843","3rd Qu :6.400","Max. :7.900")
Sepal.Width=c("Min. :2.000","1st Qu.:2.800","Median :3.000","Mean :3.057","3rd Qu :3.300","Max. :4.400")
Petal.Length=c("Min. :1.000","1st Qu.:1.600","Median :4.350","Mean :3.758","3rd Qu :5.100","Max. :6.900")
Petal.Width=c("Min. :0.100","1st Qu.:0.300","Median :1.300","Mean :1.199","3rd Qu :1.800","Max. :2.500")
kk=cbind(Sepal.Length,Sepal.Width,Petal.Length,Petal.Width)
as.table(kk)
但它有行名(A,B,C,D,E,F)
![在此输入图片说明] [2]
如何删除那些字母??
或者有没有不同的方法来制作这个表?
请帮助
答案 0 :(得分:0)
kk <- as.table(kk)
dimnames(kk)[[1]] <- rep("", nrow(kk))
## Sepal.Length Sepal.Width Petal.Length Petal.Width
## Min. :4.300 Min. :2.000 Min. :1.000 Min. :0.100
## 1st Qu.:5.100 1st Qu.:2.800 1st Qu.:1.600 1st Qu.:0.300
## Median :5.800 Median :3.000 Median :4.350 Median :1.300
## Mean :5.843 Mean :3.057 Mean :3.758 Mean :1.199
## 3rd Qu :6.400 3rd Qu :3.300 3rd Qu :5.100 3rd Qu :1.800
## Max. :7.900 Max. :4.400 Max. :6.900 Max. :2.500