Description Usage Arguments Value See Also Examples
Performs a correlation test between two sets of variables. All the variables must be either
feature names or column names of pheno data (sample information). There are two ways to use this function:
either provide a set of variables as x
, and all correlations between those variables are computed. Or
provide two distinct sets of variables x, y
and correlations between each x variable
and each y variable are computed.
1 2 | perform_correlation_tests(object, x, y = x, fdr = TRUE,
duplicates = FALSE, ...)
|
object |
a MetaboSet object |
x |
character vector, names of variables to be correlated |
y |
character vector, either identical to x (the default) or a distinct set of variables to be correlated agains x |
fdr |
logical, whether p-values from the correlation test should be adjusted with FDR correction |
... |
other parameters passed to |
duplicated |
logical, whether correlations should be dublicated. If |
a data frame with the results of correlation tests: the pair of variables, correlation coefficient and p-value
1 2 3 4 5 6 7 8 9 | # Correlations between all features
correlations <- perform_correlation_tests(example_set, x = featureNames(example_set))
# Spearman Correlations between features and sample information variables
# Drop QCs and convert time to numeric
no_qc <- drop_qcs(example_set)
no_qc$Time <- as.numeric(no_qc$Time)
correlations <- perform_correlation_tests(no_qc, x = featureNames(example_set),
y = c("Time", "Injection_order"), method = "spearman")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.