cmultRepl2: Zero replacement for compositional data

cmultRepl2R Documentation

Zero replacement for compositional data

Description

cmultRepl2 replaces the zeros for a matrix where each row is compositional

Usage

cmultRepl2(x, zero.rep = "bayes")

Arguments

x

a matrix object with the information of variables (columns) for each sample (rows).

zero.rep

if "bayes" the Bayesian - Multiplicative treatment implemented in zCompositions is applied. If "one", a pseudocount of 1 is added to the whole matrix.

Value

The initial matrix after the zero - replacement normalized so that each sample's composition sums one.

Examples


# Load the count matrix (with zeros)
  x <- HIV[,1:60]
# Zero replacement
  x.non0 <- cmultRepl2(x, zero.rep = "bayes")



malucalle/selbal documentation built on May 31, 2024, 2:36 p.m.