psct_clr: psct_clr

Description Usage Arguments Value

View source: R/data_prep.R

Description

Adds a pseudocount, (re-)closes to proportions, and then applies centered log-ratio transformation

Usage

1
psct_clr(otus, pseudocount = NULL)

Arguments

otus

Matrix of OTU counts or proportions. Rows are samples, columns are OTUs.

pseudocount

Pseudocount to be added to all values in OTU matrix. If NULL, then 0.5 is added if entries are counts, or min(1e-06, 0.5*min(nonzero p)) if entries are proportions. If all entries are nonzero, nothing is added.

Value

Matrix of CLR-transformed data (dimensions, rownames, colnames match input)


aplantin/pldist documentation built on Feb. 26, 2021, 2:19 p.m.