extract_posthoc_res: Extract results from a posthoc test

View source: R/post-hoc-test.R

extract_posthoc_resR Documentation

Extract results from a posthoc test

Description

This function extracts the results of posthoc test.

Usage

extract_posthoc_res(object, features = NULL)

Arguments

object

a postHocTest object.

features

either NULL extracts results of all features, or a character vector to specify the test resuts of which features are extracted.

Value

a IRanges::SimpleDFrameList object.

Examples

require(IRanges)
pht <- postHocTest(
    result = DataFrameList(
        featureA = DataFrame(
            comparisons = c("group2-group1", 
                "group3-group1", 
                "group3-group2"),
            diff_mean = runif(3),
            pvalue = rep(0.01, 3),
            ci_lower = rep(0.01, 3),
            ci_upper = rep(0.011, 3)
        ),
        featureB = DataFrame(
            comparisons = c("group2-group1", 
                "group3-group1", 
                "group3-group2"),
            diff_mean = runif(3),
            pvalue = rep(0.01, 3),
            ci_lower = rep(0.01, 3),
            ci_upper = rep(0.011, 3)
        )
    ),
    abundance = data.frame(
        featureA = runif(3),
        featureB = runif(3),
        group = c("group1", "group2", "grou3")
    )
)
extract_posthoc_res(pht, "featureA")[[1]]

yiluheihei/microbiomeMarker documentation built on Nov. 5, 2023, 7:19 a.m.