correlation_test: Correlation test of two variables or samples

Description Usage Arguments Value Examples

View source: R/univariate.R

Description

Performs correlations test of two variables or samples from the dataset.

Usage

1
2
correlation_test(dataset, x, y, method = "pearson", 
alternative = "two.sided", by.var = T)

Arguments

dataset

list representing the dataset from a metabolomics experiment.

x

first variable or sample.

y

second variable or sample.

method

correlation method, it can be "pearson", "kendall" or "spearman".

alternative

alternative argument from cor.test of stats package. Can be "two.sided", "less" or "greater".

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 result from cor.test function of stats package.

Examples

1
2
3
4
  ## Example of correlations test of variables
  data(cachexia)
  corr.result = correlation_test(cachexia, "Serine", "Creatine", method = "pearson", 
		by.var = TRUE)

specmine documentation built on May 29, 2017, 3 p.m.