{
data(stemHypoxia)
##Just to make a balanced dataset in the Fisher sense (2 samples per
## time*oxygen levels)
design<-design[design$time %in% c(0.5, 1, 5) & design$oxygen %in% c(1,5,21),]
design$time<-as.factor(design$time)
design$oxygen<-as.factor(design$oxygen)
rownames(M)<-M[, 1]
##Keeping appropriate samples only
M<-M[, colnames(M) %in% design$samplename]
##Just to test if it works. In a real scenario, use NPermutations >= 100 if
##the conditions (columns) of M allow it. Verbose parameter is FALSE by
##default
permuted<-permutation(model=~time*oxygen, data=M, design=design,
NPermutations=2, nCpus=3)
}
Run the code above in your browser using DataLab