Learn R Programming

crmn (version 0.0.21)

weightnorm: Normalize by sample weight

Description

Normalize samples by their weight (as in grams fresh weight)

Usage

weightnorm(object, weight = "weight", lg = FALSE)

Arguments

object

an ExpressionSet

weight

a string naming the pheno data column with the weight or a numeric vector with one weight value per sample.

lg

is the assay data already on the log-scale or not. If lg, the weight value is also log-transformed and subtraction is used instead of division.

Value

the normalized expression set

Details

Normalize each sample by dividing by the loaded sample weight. The weight argument is takes from the pheno data (or given as numerical vector with one value per sample). Missing values are not tolerated.

Examples

Run this code
# NOT RUN {
data(mix)
w <- runif(ncol(mix),1, 1.3)
weightnorm(mix, w)
# }

Run the code above in your browser using DataLab