ber (version 3.0)

mean_centering: mean_centering

Description

Batch effects are removed using the means of the batches.

Usage

mean_centering(Y, b)

Arguments

Y
A matrix with $n$ rows and $g$ columns, where $n$ is the number of objects and $g$ is the number of variables. In the case of gene expression data, columns correspond to genes (probe sets) and rows to samples.
b
A vector of class factor with the element in position $i$ ($i=1,\ldots,n$) representing the batch from which observation $i$ belongs to.

Value

  • A matrix of adjusted data with $n$ rows and $g$ columns.

See Also

ber, ber_bg, combat_np, combat_p, standardization

Examples

Run this code
library(golubEsets)
library(vsn)
data(Golub_Merge)
E<-exprs(vsn2(Golub_Merge))
batch<-Golub_Merge$Source
Eadj<-mean_centering(t(E),batch)

Run the code above in your browser using DataCamp Workspace