View source: R/filter_ambient_ttest.R
filter_ambient_ttest | R Documentation |
This function allows you to filter compounds based on whether the quantity of a compound in ambient or blank samples vs. floral samples is significantly different. It creates a filter_ambient_ttest column with the following values: OK (passed t-test), tTestFail (did not pass t-test), tTestZeros (cannot run t-test, data are all zeros), tTestSmallN (nonzero data but t-test returned NA or NaN). The (adjusted) p-value is added in the ambient_pvalue column.
filter_ambient_ttest( chemtable, sampletable, metadata, alpha, adjust = "none", compare = "ambient" )
chemtable |
the data frame of the data about the compounds |
sampletable |
the wide data frame with samples in rows and compound names in columns, containing peak areas |
metadata |
the data frame that contains meta data about the group, type, and other attributes of each sample |
alpha |
maximum acceptable p-value, defaults to 0.05 |
adjust |
"fdr" for False Discovery Rate correction, "none" for no correction, or any other method of p.adjust |
compare |
the type of sample to compare against - ambient or blank |
filter_ambient_ttest(chemtable,sampletable,metadata,0.05)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.