[R] basic table statistics

Walmes Zeviani walmeszeviani at hotmail.com
Sat Apr 24 22:56:38 CEST 2010


You can use fBasics package

sample(c("A","B","C"),size=20,replace = T) -> type
rnorm(20) -> value
data.frame(ty=type,val=value) -> test

require(fBasics)

nam <- rownames(basicStats(test$val))
result <- do.call("cbind", with(test, tapply(val, ty, basicStats)))
rownames(result) <- nam
result

Bests.

-----
..ooo0
...................................................................................................
..(....)... 0ooo...                              Walmes Zeviani
...\..(.....(.....)...     Master in Statistics and Agricultural
Experimentation
....\_)..... )../....       walmeszeviani at hotmail.com, Lavras - MG, Brasil
............
(_/............................................................................................
-- 
View this message in context: http://r.789695.n4.nabble.com/basic-table-statistics-tp2062829p2063832.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list