# Simulate gene expression data,
# 6 microarrays with 1000 genes on each array
set.seed(2004)
y <- matrix(rnorm(6000),ncol=4)
# two experimental groups and one control group with two replicates each
group <- factor(c("A","A","B","B"))
design <- model.matrix(~group)
# fit a linear model
fit <- lmFit(y,design)
fit <- eBayes(fit)
# output predictive log fold changes for first 5 genes
pfc <- predFCm(fit,coef=2)
Run the code above in your browser using DataLab