prepareObserved {benchdamic} | R Documentation |
Continuity corrected logarithms of the average counts and fraction of zeroes by feature.
prepareObserved(counts, scale = NULL)
counts |
a phyloseq object or a matrix of counts with features (OTUs, ASVs, genes) by row and samples by column. |
scale |
If specified it refers to the character vector used in
|
A data frame containing the continuity corrected logarithm for the
raw count mean values for each taxon of the matrix of counts in the Y
column and the observed zero rate in the Y0
column. If scale
is
specified the continuity corrected logarithm for the mean CPM
(scale = "default"
) or the mean counts per median library size
(scale = "median"
) is computed instead.
# Generate some random counts counts <- matrix(rnbinom(n = 60, size = 3, prob = 0.5), nrow = 10, ncol = 6) observed1 <- prepareObserved(counts) # For the comparison with HURDLE model observed2 <- prepareObserved(counts, scale = "median")