correl: Correlation Coefficient

View source: R/correl.R

correlR Documentation

Correlation Coefficient

Description

An exact correlation for ties or without ties. Methods of Kendall, Spearman and Pearson.

Usage

correl(x, y, method = "pearson",alternative="two.sided")

Arguments

x

Vector

y

Vector

method

"pearson", "kendall", "spearman"

alternative

"two.sided", "less", "greater"

Value

The correlation of x,y vector with the statistical value and its probability

Author(s)

Felipe de Mendiburu

References

Numerical Recipes in C. Second Edition.

See Also

correlation

Examples

library(agricolae)
data(soil)
with(soil,correl(pH,clay,method="kendall"))
with(soil,correl(pH,clay,method="spearman"))
with(soil,correl(pH,clay,method="pearson"))

agricolae documentation built on Oct. 23, 2023, 1:06 a.m.