get_mean_median: get the mean and median of specific feature.

Description Usage Arguments Value Author(s) Examples

View source: R/plot-ggdiffbartaxa.R

Description

get the mean and median of specific feature.

Usage

1
get_mean_median(datameta, feature, subclass)

Arguments

datameta

data.frame, nrow sample * ncol feature + factor.

feature

character vector, the feature contained in datameta.

subclass

character, factor name.

Value

featureMeanMedian object, contained the abundance of feature, and the mean and median of feature by subclass.

Author(s)

Shuangbin Xu

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(hmp_aerobiosis_small)
head(sampleda)
featureda <- merge(featureda, sampleda, by=0)
rownames(featureda) <- as.vector(featureda$Row.names)
featureda$Row.names <- NULL
feameamed <- get_mean_median(datameta=featureda, 
                    feature="p__Actinobacteria", 
                    subclass="body_site")
#not run in example
#fplot <- ggdifftaxbar(feameamed, featurename="p__Actinobacteria", 
#                     classgroup="oxygen_availability", subclass="body_site")

MicrobiotaProcess documentation built on April 18, 2021, 6 p.m.