clr: Centered log-ratio (CLR) transform

View source: R/barebonesCoNet.R

clrR Documentation

Centered log-ratio (CLR) transform

Description

In the CLR transform, each entry is divided by the geometric mean of its sample and then the logarithm is taken.

Usage

clr(
  abundances,
  minocc = 0,
  pseudocount = 1,
  scale.factor = 1,
  omit.zeros = FALSE
)

Arguments

abundances

a matrix with taxa as rows and samples as columns

minocc

prevalence filter; ignored if 0 or below

pseudocount

zero replacement value; should be above 0

scale.factor

scaling factor; abundances will be multiplied with this factor

omit.zeros

if TRUE, ignore pseudocount and compute clr transform only on non-zero elements

Details

When omit.zeros is set to true, the default behaviour of clr in the compositions package when applied column-wise is reproduced.

Value

clr-transformed matrix


hallucigenia-sparsa/seqgroup documentation built on July 6, 2022, 1:11 p.m.