corncob_results_into_list: Extract corncob results

View source: R/corncob_results_into_list.R

corncob_results_into_listR Documentation

Extract corncob results

Description

An easy wrangling function to extract all results from a corncob differential abundance experiment. NB: so far two things are left to test: (1) the order of the formulas might be important, and the last term is what this function will extract. (2) Extraction of results for regression against a continuous variable is not available yet

Usage

corncob_results_into_list(res, class = "factor")

Arguments

res

A 'corncob differentialTest' result object. \textbfNB: only analyses with 'phyloseq'objects as input are supported for now.

class
trait

A 'character' vector with the metadata column name to extract the results from.

Value

A 'list' of 'data.frame's with all contrasts applicable against the reference. NB: other pairwise contrasts are not made

Examples

library(corncob)
# phyloseq example
data(soil_phylum_small)
da_analysis <- differentialTest(formula = ~ DayAmdmt,
                               phi.formula = ~ DayAmdmt,
                               formula_null = ~ 1,
                              phi.formula_null = ~ DayAmdmt,
                               test = "Wald", boot = FALSE,
                               data = soil_phylum_small,
                               fdr_cutoff = 0.05)

da_analysis_wrangled <- corncob_results_into_list(da_analysis, class = "factor")


g-antonello/gautils documentation built on May 3, 2024, 10:51 a.m.