Description Usage Arguments Value Examples
Performs correlations test of two variables or samples from the dataset.
1 2 | correlation_test(dataset, x, y, method = "pearson",
alternative = "two.sided", by.var = TRUE)
|
dataset |
list representing the dataset from a metabolomics experiment. |
x |
first variable or sample. |
y |
second variable or sample. |
method |
correlation method, it can be "pearson", "kendall" or "spearman". |
alternative |
alternative argument from cor.test of stats package. Can be "two.sided", "less" or "greater". |
by.var |
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.
1 2 3 4 5 | ## Example of correlations test of variables
library(specmine.datasets)
data(cachexia)
corr.result = correlation_test(cachexia, "Serine", "Creatine", method = "pearson",
by.var = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.