Learn R Programming

bapred (version 0.2)

meancenter: Batch effect adjustment by mean-centering

Description

Performs batch effect adjustment by centering the variables within batches to have zero mean.

Usage

meancenter(x, batch)

Arguments

x
matrix. The covariate matrix of the new data. Observations in rows, variables in columns.
batch
factor. Batch variable. Currently has to have levels: '1', '2', '3' and so on.

Value

  • meancenter returns an object of class meancenter. An object of class "meancenter" is a list containing the following components:
  • xadjmatrix of adjusted (training) data
  • nbatchesnumber of batches
  • batchbatch variable

Examples

Run this code
data(autism)

params <- meancenter(x=X, batch=batch)

Run the code above in your browser using DataLab