desc_stats_by_group: desc_stats_by_group

View source: R/BetweenGroup.test.R

desc_stats_by_groupR Documentation

desc_stats_by_group

Description

The descriptive statistics summary of all features by grouping of compositional microbiome data.

Usage

desc_stats_by_group(x, y, clr_transform = FALSE, positive_class = NA)

Arguments

x

A data.martrix or data.frame including multiple numeric vectors.

y

A factor with two or more levels.

clr_transform

A logical value indicates if clr transformation before statistical analysis of compositional microbiome data.

positive_class

A string indicating the specified class in the factor y. The positive class should be specified in the case-control design.

Author(s)

Shi Huang

Examples

y <-factor(c(rep("A", 30), rep("B", 30)))
x <- data.frame(rbind(t(rmultinom(7, 75, c(.201,.5,.02,.18,.099))),
            t(rmultinom(8, 75, c(.201,.4,.12,.18,.099))),
            t(rmultinom(15, 75, c(.011,.3,.22,.18,.289))),
            t(rmultinom(15, 75, c(.091,.2,.32,.18,.209))),
            t(rmultinom(15, 75, c(.001,.1,.42,.18,.299)))))
desc_stats_by_group(x, y, clr_transform=FALSE)
desc_stats_by_group(x, y, clr_transform=TRUE)

shihuang047/crossRanger documentation built on Sept. 18, 2024, 2:56 a.m.