clr: clr

View source: R/clr.R

clrR Documentation

clr

Description

use aldex2 to perform clr transform. aldex.clr performs Monte Carlo sampling from a Dirichlet distribution for each sample. Then clr transformation each value generated. This function uses the median of these Monte-Carlo Dirichlet instances as the clr-transformed value, and returns as a dataframe be default.

Usage

clr(count_dataframe, condition = NULL, return_as_dataframe = TRUE)

Arguments

return_as_dataframe

default TRUE. Set to FALSE to return as aldex.clr object

Details

@param count_dataframe dataframe with samples in columns, ASVs in rows @param condition passed into conds argument of aldex.clr. When set to NULL (default), each sample is assigned a different condition. Alternatively, can supply a vector containing a descriptor for the samples, allowing them to be grouped and compared. This setting is arbitrary, unless return_as_dataframe is set to FALSE and performing diversity analysis with ALDEx2.

Value

dataframe of clr-tranfsormed counts or aldex.clr object with clr-transformed Monte-Carlo Dirichlet instances of counts

Examples

library(ALDEx2)
data(selex)
# subset for efficiency
selex <- selex[1201:1600,]
df <- clr(count_dataframe = selex, condition = NULL, return_as_dataframe = TRUE)

OxfordCMS/OCMSutility documentation built on Feb. 27, 2025, 8:19 p.m.