balance {Pigengene} | R Documentation |
Oversamples data by repeating rows such that each condition has roughly the same number of samples.
balance(Data, Labels, amplification = 5, verbose = 0)
Data |
A matrix or data frame containing the expression data, with genes corresponding to columns and rows corresponding to samples. Rows and columns must be named. |
Labels |
A (preferably named) vector containing the Labels (condition types) for
|
amplification |
An integer that controls the number of repeats for each condition. The number of all samples roughly will be multiplied by this factor after oversampling. |
verbose |
The integer level of verbosity. 0 means silent and higher values produce more details of computation. |
A list of:
balanced |
The matrix of oversampled data |
Reptimes |
A vector of integers named by conditions reporting the number of repeats for each condition. |
origSampleInds |
The indices of rows in |
Habil Zare
Pigengene-package
,
one.step.pigengene
, wgcna.one.step
,
compute.pigengene
data(aml) data(mds) d1 <- rbind(aml,mds) Labels <- c(rep("AML",nrow(aml)),rep("MDS",nrow(mds))) names(Labels) <- rownames(d1) b1 <- balance(Data=d1, Labels=Labels) d2 <- b1$balanced