Applies the centered log-ratio transform row-wise. For log-scale inputs this subtracts the within-sample mean from each feature. For raw positive inputs the function applies `log(x + pseudocount)` before centering.
Usage
clr_transform(x, input_scale = c("log", "raw"), pseudocount = 1e-08)References
Aitchison J. (1986). The Statistical Analysis of Compositional Data. Chapman and Hall.
Egozcue JJ, Pawlowsky-Glahn V, Mateu-Figueras G, Barcelo-Vidal C. (2003). Isometric logratio transformations for compositional data analysis. Mathematical Geology, 35(3), 279-300.
Gloor GB, Macklaim JM, Pawlowsky-Glahn V, Egozcue JJ. (2017). Microbiome datasets are compositional: and this is not optional. Frontiers in Microbiology, 8, 2224.