如何在 r 中按组进行汇总 table?

How to make summary table by group in r?

我想在 R
中按组做一个总结 table 按因素比较几个参数
例如

data(iris)
str(iris)

我想做table

     Group   Sepal.Length Sepal.Width Petal.Length Petal.Width
  Species1        mean       mean        mean       mean
  Species2        mean       mean        mean       mean
  Species3        mean       mean        mean       mean 

可能导入 t.test 结果
我该怎么办?

data(iris) 
aggregate(iris[,1:4], list(iris$Species), mean)