Description Usage Arguments Value
View source: R/Analysis_Functions.R
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.
1 | run_alpha_compare(df, feature, type)
|
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". |
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.