Learn R Programming

agricolae (version 1.3-7)

correl: 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")

Value

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

Arguments

x

Vector

y

Vector

method

"pearson", "kendall", "spearman"

alternative

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

Author

Felipe de Mendiburu

References

Numerical Recipes in C. Second Edition.

See Also

correlation

Examples

Run this code
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"))

Run the code above in your browser using DataLab