Learn R Programming

specmine (version 1.0)

correlations_test: Correlations test

Description

Performs correlations test to the whole dataset.

Usage

correlations_test(dataset, method = "pearson", by.var = T, alternative = "two.sided")

Arguments

dataset
list representing the dataset from a metabolomics experiment.
method
correlation method, it can be "pearson", "kendall" or "spearman".
by.var
if TRUE then the correlations of the variables will be calculated, if not then the correlations of the samples will be calculated.
alternative
alternative argument from cor.test of stats package. Can be "two.sided", "less" or "greater".

Value

Returns a matrix with the correlation values and the p-values

Examples

Run this code
## Not run: 
#   ## Example of correlations test of variables (computationally heavy)
#   data(cachexia)
#   corr.result = correlations_test(cachexia, 
# 		method = "pearson", by.var = FALSE)
# ## End(Not run)

Run the code above in your browser using DataLab