lmdme-permutation: 'permutation' of the specified lmdme object

Description Usage Arguments Value Author(s) See Also Examples

Description

Produces the specified lmdme plus the required permuted objects (sampling the columns), using the same parameters to fit the additional models.

Usage

1
2
  ## S4 method for signature 'formula,data.frame,data.frame'
permutation(model,data,design,Bayes=FALSE,verbose=FALSE,NPermutations=100,nCpus=1,...)

Arguments

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 lmFit function.

Value

list

contains the original lmdme object plus the required amount of permuted versions.

Author(s)

Cristobal Fresno and Elmer A Fernandez

See Also

lmdme

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
{
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)
}

lmdme documentation built on Nov. 8, 2020, 7:46 p.m.