permutation {lmdme} | R Documentation |
permutation
of the specified lmdme objectProduces the specified lmdme plus the required permuted objects (sampling the columns), using the same parameters to fit the additional models.
## S4 method for signature 'formula,data.frame,data.frame' permutation(model,data,design,Bayes=FALSE,verbose=FALSE,NPermutations=100,nCpus=1,...)
model |
formula object to carry out the decomposition. |
data |
data.frame with individuals (rows) and samples/conditions (columns) |
design |
data.frame with the design of the experiment, (rows) samples/conditions as in data columns and as many columns to indicate the factors present in each sample. |
Bayes |
Should limma estimate empirical Bayes statistics, i.e., moderated t-statistics? Default value is FALSE. |
verbose |
Should the process progress be printed? Default value is FALSE. |
NPermutations |
number of permutations to be calculated. Default value is 100. |
nCpus |
number of cores to be used. Default value is 1, i.e. sequential calculation. |
... |
Additional parameters for the
|
list |
contains the original lmdme object plus the required amount of permuted versions. |
Cristobal Fresno and Elmer A Fernandez
{ 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) }