clr | R Documentation |
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.
clr(count_dataframe, condition = NULL, return_as_dataframe = TRUE)
return_as_dataframe |
default |
@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
.
dataframe of clr-tranfsormed counts or aldex.clr object with clr-transformed Monte-Carlo Dirichlet instances of counts
library(ALDEx2)
data(selex)
# subset for efficiency
selex <- selex[1201:1600,]
df <- clr(count_dataframe = selex, condition = NULL, return_as_dataframe = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.