prepareObserved | R Documentation |
Continuity corrected logarithms of the average counts and fraction of zeroes by feature.
prepareObserved(object, assay_name = "counts", scale = NULL)
object |
a phyloseq object, a TreeSummarizedExperiment object, or a matrix of counts. |
assay_name |
the name of the assay to extract from the
TreeSummarizedExperiment object (default |
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.
meanDifferences
# 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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.