correlations_test: Correlations test

Description Usage Arguments Value Examples

View source: R/univariate.R

Description

Performs correlations test to the whole dataset.

Usage

1
2
correlations_test(dataset, method = "pearson", by.var = TRUE, 
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

1
2
3
4
5
  ## Example of correlations test of variables
  library(specmine.datasets)
  data(cachexia)
  corr.result = correlations_test(cachexia, 
		method = "pearson", by.var = FALSE)

specmine documentation built on Sept. 21, 2021, 5:06 p.m.