data(iris)
sel <- c("setosa", "versicolor")
grp <- iris[,5]
idx <- match(iris[,5],sel,nomatch = 0) > 0
cls <- factor(iris[idx,5])
dat <- iris[idx,1:4]
## stats for the single vector
stats.vec(dat[[1]],cls, method = "median",test.method = "wilcox.test")
## use matrix format
tab <- stats.mat(dat,cls, method = "median",test.method = "wilcox.test",
padj.method = "BH")
sapply(tab, class)
Run the code above in your browser using DataLab