Here I would like to summary the data by min, max, and mean.
set.seed(55775)
x <- round(runif(150000,1,1000),2)
g <- sample(LETTERS[1:4],150000,replace=T)
I know tapply can do the summary, tapply(x,g,summary)
, and it will give the same answer as the following table, but I don't know how to generate this neat table instead of using tapply...
g MIN MAX MEAN
A 1.06 999.94 500.5395
B 1.01 999.95 501.6863
C 1.01 999.99 503.8504
D 1.05 999.97 500.5327