powered by
Performs correlations test of two variables or samples from the dataset.
correlation_test(dataset, x, y, method = "pearson", alternative = "two.sided", by.var = TRUE)
list representing the dataset from a metabolomics experiment.
first variable or sample.
second variable or sample.
correlation method, it can be "pearson", "kendall" or "spearman".
alternative argument from cor.test of stats package. Can be "two.sided", "less" or "greater".
if TRUE then the correlations of the variables will be calculated, if not then the correlations of the samples will be calculated.
Returns the correlation result from cor.test function of stats package.
# NOT RUN { ## Example of correlations test of variables data(cachexia) corr.result = correlation_test(cachexia, "Serine", "Creatine", method = "pearson", by.var = TRUE) # }
Run the code above in your browser using DataLab