Learn R Programming

specmine (version 3.1.6)

correlations_test: Correlations test

Description

Performs correlations test to the whole dataset.

Usage

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

Run this code
# NOT RUN {
  ## Example of correlations test of variables
  library(specmine.datasets)
  data(cachexia)
  corr.result = correlations_test(cachexia, 
		method = "pearson", by.var = FALSE)
# }

Run the code above in your browser using DataLab