Learn R Programming

specmine (version 3.1.6)

correlations_dataset: Dataset correlations

Description

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

Usage

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

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
# NOT RUN {
  ## Example of correlations of variables
  library(specmine.datasets)
  data(cachexia)
  corr.result = correlations_dataset(cachexia, 
		method = "pearson", by.var = TRUE)
# }

Run the code above in your browser using DataLab