# NOT RUN {
library(wrMisc)
set.seed(2005); mat <- matrix(round(runif(600),1),ncol=6)
rownames(mat) <- c(rep(letters[1:25],each=3),letters[2:26])
MAplotW(mat[,2]-mat[,1], rowMeans(mat))
## assume 2 groups with 3 samples each
matMeans <- rowGrpMeans(mat, gr=gl(2,3,labels=LETTERS[3:4]))
MAplotW(matMeans[,2]-matMeans[,1], matMeans)
## assume 2 groups with 3 samples each and run moderated t-test (from package 'limma')
tRes <- moderTest2grp(mat,gl(2,3))
MAplotW(tRes$Mval, tRes$Amean)
MAplotW(M=tRes$Mval, A=tRes$means, FCth=1.3)
MAplotW(tRes)
MAplotW(tRes, limM=c(-2,2), FCth=1.3)
# }
Run the code above in your browser using DataCamp Workspace