Learn R Programming

specmine (version 1.0)

normalize_samples: Normalize samples

Description

Normalize the data from a datamatrix with a specific method.

Usage

normalize_samples(datamat, method, ref = NULL, constant = 1000)

Arguments

datamat
data matrix.
method
string specifying the normalization method. The possible values are:
  • "sum" normalization by sum.
  • "median" normalization by median.
  • "ref.sample" normalization by reference sample.
  • "ref.feature" normalization by reference feature.

ref
the reference if method is "ref.sample" or "ref.feature".
constant
the constant value if method is "sum".

Value

Returns the data matrix normalized.

Examples

Run this code
  ## Example of normalization by median
  data(cassavaPPD)
  datamat.norm = normalize_samples(cassavaPPD$data, "median")

Run the code above in your browser using DataLab