cor

Correlation

Computes the Pearson correlation coefficient between two vectors.

Parameters

Returns

The correlation coefficient (-1 to 1).

Examples

cor(mtcars["mpg"], mtcars["wt"])