run_alpha_compare: run_alpha_compare Function This function takes in a metadata...

Description Usage Arguments Value

View source: R/Analysis_Functions.R

Description

run_alpha_compare Function This function takes in a metadata feature to test, a type of alpha diversity and the dataframe containing the metadata and the alpha div metric. It then compares a baseline linear model that only contains DNA extraction and y ~ DNA.Extraction and a second model containing both DNA.Extraction and the metadata feature using an ANOVA. Finally the p-value for the metadata feature from this anova is returned.

Usage

1

Arguments

df

A dataframe containing the columns "faiths" "shannon" "evenness" and "richness" along with the metadata feature that will be tested.

feature

The metadata feature that will be tested.

type

The type of alpha diversity that you would like to test. The current options are "faiths", "richness", "evenness" and "shannon".

Value

Returns a p-value from an anova comparing a model that contains only dna extraction and a model that contains both dna extraction and the metadata feature of interest.


nearinj/Healthy_Oral_Microbiome documentation built on April 3, 2020, 12:58 a.m.