Learn R Programming

specmine (version 1.0)

correlations_dataset: Dataset correlations

Description

Calculate the correlations of all variables or samples in the dataset.

Usage

correlations_dataset(dataset, method = "pearson", by.var = T)

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.

Value

Returns the correlation matrix

Examples

Run this code
  ## Example of correlations of variables
  data(cachexia)
  corr.result = correlations_dataset(cachexia, 
		method = "pearson", by.var = TRUE)

Run the code above in your browser using DataLab