Learn R Programming

EMA (version 1.4.4)

foldchange: Compute foldchange

Description

Caculates the foldchange for each genes.

Usage

foldchange(data, labels, unlog = TRUE)

Arguments

data
A matrix or a data frame of expression data. Each row of 'data' must correspond to a gene, and each column to a sample.
labels
A vector of length 'ncol(data)' containing the class labels of the samples. 'labels' should be a numeric vector 0 / 1. 0 specifying the samples of, e.g., the control group and 1 specifying, e.g., the case group.
unlog
'TRUE' if the data have to be unlog before the foldchange calculation.

Value

A vector of length 'n genes' with the foldchange for each genes.

Examples

Run this code
## load data
data(marty)

## Not run: 
# ## filtering data
# marty <- expFilter(marty, threshold=3.5, graph=FALSE)
# ## End(Not run)

##Class label 0/1
marty.type.num <- ifelse(marty.type.cl=="Her2+",0,1)

## run folchange on 50 genes
fcOUT <- foldchange(marty[1:50,], marty.type.num)

Run the code above in your browser using DataLab