correl | R Documentation |

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

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

`x` |
Vector |

`y` |
Vector |

`method` |
"pearson", "kendall", "spearman" |

`alternative` |
"two.sided", "less", "greater" |

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

Felipe de Mendiburu

Numerical Recipes in C. Second Edition.

`correlation`

```
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"))
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.