cormat: Correlations of Characters

cormatR Documentation

Correlations of Characters

Description

The cormat function calculates the matrix of the correlation coefficients of the characters.

Usage

cormat(object, method = "Pearson")

cormatSignifTest(object, method = "Pearson", alternative = "two.sided")

Arguments

object

an object of class morphodata.

method

a character string indicating which correlation coefficient is to be used for the test. One of "Pearson" (default), or "Ppearman" can be applied.

alternative

indicates the alternative hypothesis and must be one of "two.sided" (default), "greater" (positive association) or "less" (negative association).

Details

This function returns table with pairwise correlation coefficients for each pair of morphological characters. The result is formatted as a data.frame to allow export with the exportRes function.

Significance tests are usually unnecessary for morphometric analysis. Anyway, if tests are needed, they can be computed using the cormatSignifTest function.

Value

A data.frame, storing correlation coefficients for each pair of morphological characters.

Examples

data(centaurea)

correlations.p = cormat(centaurea, method = "Pearson")
correlations.s = cormat(centaurea, method = "Spearman")

## Not run: exportRes(correlations.p, file = "correlations.pearson.txt")
## Not run: exportRes(correlations.s, file = "correlations.spearman.txt")

correlations.p = cormatSignifTest(centaurea, method = "Pearson")

MorphoTools2 documentation built on March 7, 2023, 6:18 p.m.