cormat {MorphoTools2} | R 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 |
method |
a character string indicating which correlation coefficient is to be used for the test.
One of |
alternative |
indicates the alternative hypothesis and must be one of |
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")